Class ExplainRequestBuilder


A builder for ExplainRequest.
  • Constructor Details

  • Method Details

    • setType

      public  type)
      Sets the type to get a score explanation for.
    • setId

      public  id)
      Sets the id to get a score explanation for.
    • setRouting

      public  routing)
      Sets the routing for sharding.
    • setParent

      public  parent)
      Simple sets the routing. Since the parent is only used to get to the right shard.
    • setPreference

      public  preference)
      Sets the shard preference.
    • setQuery

      public ExplainRequestBuilder setQuery(QueryBuilder query)
      Sets the query to get a score explanation for.
    • setStoredFields

      public ... fields)
      Explicitly specify the stored fields that will be returned for the explained document. By default, nothing is returned.
    • setFetchSource

      public ExplainRequestBuilder setFetchSource(boolean fetch)
      Indicates whether the response should contain the stored _source
    • setFetchSource

      public ExplainRequestBuilder setFetchSource(@Nullable  include, @Nullable  exclude)
      Indicate that _source should be returned, with an "include" and/or "exclude" set which can include simple wildcard elements.
      Parameters:
      include - An optional include (optionally wildcarded) pattern to filter the returned _source
      exclude - An optional exclude (optionally wildcarded) pattern to filter the returned _source
    • setFetchSource

      public ExplainRequestBuilder setFetchSource(@Nullable [] includes, @Nullable [] excludes)
      Indicate that _source should be returned, with an "include" and/or "exclude" set which can include simple wildcard elements.
      Parameters:
      includes - An optional list of include (optionally wildcarded) pattern to filter the returned _source
      excludes - An optional list of exclude (optionally wildcarded) pattern to filter the returned _source