Class ValidateQueryRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.indices.ValidateQueryRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class ValidateQueryRequest extends RequestBase implements JsonpSerializable
Validate a query.

Validates a query without running it.

See Also:
  • Field Details

  • Method Details

    • of

    • allShards

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

      API name: all_shards

    • allowNoIndices

      @Nullable public final Boolean allowNoIndices()
      A setting that does two separate checks on the index expression. If false, the request returns an error (1) if any wildcard expression (including _all and *) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. If true, index expressions that resolve to no indices are allowed and the request returns an empty result.

      API name: allow_no_indices

    • analyzeWildcard

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

      API name: analyze_wildcard

    • analyzer

      @Nullable public final String analyzer()
      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

      @Nullable public final Operator defaultOperator()
      The default operator for query string query: and or or.

      API name: default_operator

    • df

      @Nullable public final String df()
      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 List<ExpandWildcard> expandWildcards()
      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.

      API name: expand_wildcards

    • explain

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

      API name: explain

    • ignoreUnavailable

      @Nullable public final Boolean ignoreUnavailable()
      If false, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable. If true, unavailable concrete targets are silently ignored.

      API name: ignore_unavailable

    • index

      public final List<String> index()
      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

    • lenient

      @Nullable public final Boolean lenient()
      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

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

      API name: q

    • query

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

      API name: query

    • rewrite

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

      API name: rewrite

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • rebuild

      public ValidateQueryRequest.Builder rebuild()
      Returns:
      New ValidateQueryRequest.Builder initialized with field values of this instance
    • setupValidateQueryRequestDeserializer

      protected static void setupValidateQueryRequestDeserializer(ObjectDeserializer<ValidateQueryRequest.Builder> op)