Skip to content

Commit

Permalink
Replaced hard-coded action names by constants from core
Browse files Browse the repository at this point in the history
Signed-off-by: Nils Bandener <[email protected]>
  • Loading branch information
nibix committed Jul 23, 2024
1 parent 94c756f commit 57bd4f3
Showing 1 changed file with 10 additions and 5 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,11 +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" };
MultiSearchAction.NAME,
MultiGetAction.NAME,
GetAction.NAME,
SearchAction.NAME,
FieldCapabilitiesAction.NAME };

private static final QueryBuilder NONE_QUERY = new MatchNoneQueryBuilder();

Expand Down

0 comments on commit 57bd4f3

Please sign in to comment.