Class ValidateQueryRequest.Builder

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

  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • copy

      @Nonnull public ValidateQueryRequest.Builder copy()
      Description copied from interface: CopyableBuilder
      Create a new builder CopyableBuilder that is a copy of this one.
      Specified by:
      copy in interface CopyableBuilder<ValidateQueryRequest.Builder,ValidateQueryRequest>
      Returns:
      a new builder instance.
    • self

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

      @Nonnull 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

      @Nonnull 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 indexes. This behavior applies even if the request targets other open indexes.

      API name: allow_no_indices

    • analyzeWildcard

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

      API name: analyze_wildcard

    • analyzer

      @Nonnull 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

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

      API name: default_operator

    • df

      @Nonnull 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

      @Nonnull 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

      @Nonnull 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

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

      API name: explain

    • ignoreUnavailable

      @Nonnull 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

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

      API name: index

      Adds all elements of list to index.

    • index

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

      API name: index

      Adds one or more values to index.

    • lenient

      @Nonnull 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

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

      API name: q

    • query

      @Nonnull public final ValidateQueryRequest.Builder query(@Nullable Query value)
      API name: query
    • query

      API name: query
    • rewrite

      @Nonnull 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

    • build

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