Class EsqlFlags

java.lang.Object
org.elasticsearch.xpack.esql.plugin.EsqlFlags

public class EsqlFlags extends Object
Class holding all the flags that can be used to change behavior for certain features in ESQL. The flags are backed by Settings so they can be dynamically changed. When adding a new flag, make sure to add it to ALL_ESQL_FLAGS_SETTINGS so it gets registered and unit tests can pass.
  • Field Details

    • ESQL_STRING_LIKE_ON_INDEX

      public static final Setting<Boolean> ESQL_STRING_LIKE_ON_INDEX
    • ESQL_ROUNDTO_PUSHDOWN_THRESHOLD

      public static final Setting<Integer> ESQL_ROUNDTO_PUSHDOWN_THRESHOLD
      The maximum number of rounding points to push down to Lucene for the roundTo function at cluster level. ReplaceRoundToWithQueryAndTags checks this threshold before rewriting RoundTo to range queries. There is also a query level ROUNDTO_PUSHDOWN_THRESHOLD defined in QueryPragmas. The cluster level threshold defaults to 127, it is the same as the maximum number of buckets used in Rounding. The query level threshold defaults to -1, which means this query level setting is not set and cluster level upper limit will be used. If query level threshold is set to greater than or equals to 0, the query level threshold will be used, and it overrides the cluster level threshold. If the cluster level threshold is set to -1 or 0, no RoundTo pushdown will be performed, query level threshold is not set to -1 or 0.
    • ALL_ESQL_FLAGS_SETTINGS

      public static List<Setting<?>> ALL_ESQL_FLAGS_SETTINGS
  • Constructor Details

    • EsqlFlags

      public EsqlFlags(boolean stringLikeOnIndex)
      Constructor for tests.
    • EsqlFlags

      public EsqlFlags(int roundToPushdownThreshold)
      Constructor for tests.
    • EsqlFlags

      public EsqlFlags(boolean stringLikeOnIndex, int roundToPushdownThreshold)
      Constructor for tests.
    • EsqlFlags

      public EsqlFlags(ClusterSettings settings)
  • Method Details

    • stringLikeOnIndex

      public boolean stringLikeOnIndex()
    • roundToPushdownThreshold

      public int roundToPushdownThreshold()