Skip to content

Commit

Permalink
JVMCBC-1494 DisjunctionQuery min=1 is not sent to server
Browse files Browse the repository at this point in the history
Motivation
----------
Must send `min` even if it's 1 (the default) due to MB-61005

Change-Id: Ie10a404e50219c91dded53657be14a56875553e3
Reviewed-on: https://review.couchbase.org/c/couchbase-jvm-clients/+/206678
Reviewed-by: Graham Pople <graham.pople@couchbase.com>
Tested-by: Build Bot <build@couchbase.com>
Reviewed-by: Michael Reiche <michael.reiche@couchbase.com>
  • Loading branch information
dnault committed Mar 5, 2024
1 parent 5f4ba30 commit 988644e
Showing 1 changed file with 2 additions and 3 deletions.
Expand Up @@ -47,8 +47,7 @@ public CoreDisjunctionQuery(List<CoreSearchQuery> queries, @Nullable Integer min

@Override
protected void injectParams(ObjectNode input) {
if (min != null && min > 1) {
// We use min > 1 as the default minimum is 1 anyway.
if (min != null) {
input.put("min", min);
}

Expand All @@ -72,7 +71,7 @@ public DisjunctionQuery asDisjunctionProtostellar() {
.map(CoreSearchQuery::asProtostellar)
.collect(Collectors.toList()));

if (min != null && min > 1) {
if (min != null) {
query.setMinimum(min);
}

Expand Down

0 comments on commit 988644e

Please sign in to comment.