diff options
author | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2022-03-23 14:10:50 +0100 |
---|---|---|
committer | Bjørn Christian Seime <bjorncs@verizonmedia.com> | 2022-03-23 15:06:03 +0100 |
commit | da82f0eb66032d2e2de918bc60fe0dfb2a45d610 (patch) | |
tree | 8ad1b816b80eede0ff578757d4b9ecc83ce15bed /container-search/src/main/java/com/yahoo/search/grouping/request | |
parent | 4a6506e8e721d75d91e1398a876653df1e749d2b (diff) |
Allow 'inf' as value to max()
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/grouping/request')
-rw-r--r-- | container-search/src/main/java/com/yahoo/search/grouping/request/GroupingOperation.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/container-search/src/main/java/com/yahoo/search/grouping/request/GroupingOperation.java b/container-search/src/main/java/com/yahoo/search/grouping/request/GroupingOperation.java index a4934586b3f..db9585e0637 100644 --- a/container-search/src/main/java/com/yahoo/search/grouping/request/GroupingOperation.java +++ b/container-search/src/main/java/com/yahoo/search/grouping/request/GroupingOperation.java @@ -1,6 +1,7 @@ // Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.search.grouping.request; +import com.yahoo.api.annotations.Beta; import com.yahoo.collections.LazyMap; import com.yahoo.collections.LazySet; import com.yahoo.search.grouping.request.parser.GroupingParser; @@ -25,6 +26,8 @@ import java.util.Set; */ public abstract class GroupingOperation extends GroupingNode { + @Beta public static final int UNLIMITED_MAX = Integer.MAX_VALUE; + private final List<GroupingExpression> orderBy = new ArrayList<>(); private final List<GroupingExpression> outputs = new ArrayList<>(); private final List<GroupingOperation> children = new ArrayList<>(); @@ -269,6 +272,8 @@ public abstract class GroupingOperation extends GroupingNode { /** Indicates if the 'max' value has been set. */ public boolean hasMax() { return max >= 0; } + @Beta public boolean hasUnlimitedMax() { return max == Integer.MAX_VALUE; } + /** * Assigns an accuracy value for this. This is a number between 0 and 1 describing the accuracy of the result, which * again determines the speed of the grouping request. A low value will make sure the grouping operation runs fast, |