diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-23 20:30:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 20:30:23 +0100 |
commit | 73b080b527e303a60a365b2bb95b72dcc2f81f4c (patch) | |
tree | e24f76238e11794e82a6fa5dcb29e3aca2a45af1 /container-search/src/main/java/com/yahoo/search/grouping/request/GroupingOperation.java | |
parent | b07fc575ba690710f6524004848e5fc01b3a3152 (diff) | |
parent | 9b505f09092c7df8900da85b9f1d08149466c96d (diff) |
Merge pull request #21787 from vespa-engine/bjorncs/grouping-max-infv7.564.19
Bjorncs/grouping max inf
Diffstat (limited to 'container-search/src/main/java/com/yahoo/search/grouping/request/GroupingOperation.java')
-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, |