Class ExplainRequest

java.lang.Object
co.elastic.clients.elasticsearch._types.RequestBase
co.elastic.clients.elasticsearch.core.ExplainRequest
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class ExplainRequest extends RequestBase implements JsonpSerializable
Explain a document match result. Get information about why a specific document matches, or doesn't match, a query. It computes a score explanation for a query and a specific document.
See Also:
  • Field Details

  • Method Details

    • of

    • source

      @Nullable public final SourceConfigParam source()
      True or false to return the _source field or not or a list of fields to return.

      API name: _source

    • sourceExcludes

      public final List<String> sourceExcludes()
      A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in _source_includes query parameter. If the _source parameter is false, this parameter is ignored.

      API name: _source_excludes

    • sourceIncludes

      public final List<String> sourceIncludes()
      A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the _source_excludes query parameter. If the _source parameter is false, this parameter is ignored.

      API name: _source_includes

    • analyzeWildcard

      @Nullable public final Boolean analyzeWildcard()
      If true, wildcard and prefix queries are analyzed. This parameter can be used only when the q query string parameter is specified.

      API name: analyze_wildcard

    • analyzer

      @Nullable public final String analyzer()
      The analyzer to use for the query string. This parameter can be used only 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. This parameter can be used only when the q query string parameter is specified.

      API name: default_operator

    • df

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

      API name: df

    • id

      public final String id()
      Required - The document identifier.

      API name: id

    • index

      public final String index()
      Required - Index names that are used to limit the request. Only a single index name can be provided to this parameter.

      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. This parameter can be used only when the q query string parameter is specified.

      API name: lenient

    • preference

      @Nullable public final String preference()
      The node or shard the operation should be performed on. It is random by default.

      API name: preference

    • q

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

      API name: q

    • query

      @Nullable public final Query query()
      Defines the search definition using the Query DSL.

      API name: query

    • routing

      @Nullable public final String routing()
      A custom value used to route operations to a specific shard.

      API name: routing

    • storedFields

      public final List<String> storedFields()
      A comma-separated list of stored fields to return in the response.

      API name: stored_fields

    • 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)
    • setupExplainRequestDeserializer

      protected static void setupExplainRequestDeserializer(ObjectDeserializer<ExplainRequest.Builder> op)
    • createExplainEndpoint

      public static <TDocument> Endpoint<ExplainRequest,ExplainResponse<TDocument>,ErrorResponse> createExplainEndpoint(JsonpDeserializer<TDocument> tDocumentDeserializer)
      Create an "explain" endpoint.