Class ValidateQueryRequest.Builder

All Implemented Interfaces:
WithJson<ValidateQueryRequest.Builder>, ObjectBuilder<ValidateQueryRequest>
Enclosing class:
ValidateQueryRequest

public static class ValidateQueryRequest.Builder extends RequestBase.AbstractBuilder<ValidateQueryRequest.Builder> implements ObjectBuilder<ValidateQueryRequest>
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • allShards

      public final ValidateQueryRequest.Builder allShards(@Nullable Boolean value)
      If true, the validation is executed on all shards instead of one random shard per index.

      API name: all_shards

    • allowNoIndices

      public final ValidateQueryRequest.Builder allowNoIndices(@Nullable Boolean value)
      If false, the request returns an error if any wildcard expression, index alias, or _all value targets only missing or closed indices. This behavior applies even if the request targets other open indices.

      API name: allow_no_indices

    • analyzeWildcard

      public final ValidateQueryRequest.Builder analyzeWildcard(@Nullable Boolean value)
      If true, wildcard and prefix queries are analyzed.

      API name: analyze_wildcard

    • analyzer

      public final ValidateQueryRequest.Builder analyzer(@Nullable String value)
      Analyzer to use for the query string. This parameter can only be used when the q query string parameter is specified.

      API name: analyzer

    • defaultOperator

      public final ValidateQueryRequest.Builder defaultOperator(@Nullable Operator value)
      The default operator for query string query: AND or OR.

      API name: default_operator

    • df

      public final ValidateQueryRequest.Builder df(@Nullable String value)
      Field to use as default where no field prefix is given in the query string. This parameter can only be used when the q query string parameter is specified.

      API name: df

    • expandWildcards

      public final ValidateQueryRequest.Builder expandWildcards(List<ExpandWildcard> list)
      Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.

      API name: expand_wildcards

      Adds all elements of list to expandWildcards.

    • expandWildcards

      public final ValidateQueryRequest.Builder expandWildcards(ExpandWildcard value, ExpandWildcard... values)
      Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden. Valid values are: all, open, closed, hidden, none.

      API name: expand_wildcards

      Adds one or more values to expandWildcards.

    • explain

      public final ValidateQueryRequest.Builder explain(@Nullable Boolean value)
      If true, the response returns detailed information if an error has occurred.

      API name: explain

    • ignoreUnavailable

      public final ValidateQueryRequest.Builder ignoreUnavailable(@Nullable Boolean value)
      If false, the request returns an error if it targets a missing or closed index.

      API name: ignore_unavailable

    • index

      public final ValidateQueryRequest.Builder index(List<String> list)
      Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*). To search all data streams or indices, omit this parameter or use * or _all.

      API name: index

      Adds all elements of list to index.

    • index

      public final ValidateQueryRequest.Builder index(String value, String... values)
      Comma-separated list of data streams, indices, and aliases to search. Supports wildcards (*). To search all data streams or indices, omit this parameter or use * or _all.

      API name: index

      Adds one or more values to index.

    • lenient

      public final ValidateQueryRequest.Builder lenient(@Nullable Boolean value)
      If true, format-based query failures (such as providing text to a numeric field) in the query string will be ignored.

      API name: lenient

    • q

      public final ValidateQueryRequest.Builder q(@Nullable String value)
      Query in the Lucene query string syntax.

      API name: q

    • query

      public final ValidateQueryRequest.Builder query(@Nullable Query value)
      Query in the Lucene query string syntax.

      API name: query

    • query

      Query in the Lucene query string syntax.

      API name: query

    • rewrite

      public final ValidateQueryRequest.Builder rewrite(@Nullable Boolean value)
      If true, returns a more detailed explanation showing the actual Lucene query that will be executed.

      API name: rewrite

    • self

      protected ValidateQueryRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<ValidateQueryRequest.Builder>
    • build

      public ValidateQueryRequest build()
      Specified by:
      build in interface ObjectBuilder<ValidateQueryRequest>
      Throws:
      NullPointerException - if some of the required fields are null.