Skip to content

Commit

Permalink
[Backport 2.x] Fixed READ_ACTIONS required by TermsAggregationEvaluat…
Browse files Browse the repository at this point in the history
…or (opensearch-project#4607)

Signed-off-by: Nils Bandener <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent a160c79 commit 5baa3c4
Showing 1 changed file with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@
import org.apache.logging.log4j.Logger;

import org.opensearch.action.ActionRequest;
import org.opensearch.action.fieldcaps.FieldCapabilitiesAction;
import org.opensearch.action.get.GetAction;
import org.opensearch.action.get.MultiGetAction;
import org.opensearch.action.search.MultiSearchAction;
import org.opensearch.action.search.SearchAction;
import org.opensearch.action.search.SearchRequest;
import org.opensearch.cluster.metadata.IndexNameExpressionResolver;
import org.opensearch.cluster.service.ClusterService;
Expand All @@ -49,13 +54,11 @@ public class TermsAggregationEvaluator {
protected final Logger log = LogManager.getLogger(this.getClass());

private static final String[] READ_ACTIONS = new String[] {
"indices:data/read/msearch",
"indices:data/read/mget",
"indices:data/read/get",
"indices:data/read/search",
"indices:data/read/field_caps*"
// "indices:admin/mappings/fields/get*"
};
MultiSearchAction.NAME,
MultiGetAction.NAME,
GetAction.NAME,
SearchAction.NAME,
FieldCapabilitiesAction.NAME };

private static final QueryBuilder NONE_QUERY = new MatchNoneQueryBuilder();

Expand Down

0 comments on commit 5baa3c4

Please sign in to comment.