Package org.elasticsearch.action.explain
Class ExplainRequestBuilder
- java.lang.Object
-
- org.elasticsearch.action.ActionRequestBuilder<Request,Response>
-
- org.elasticsearch.action.support.single.shard.SingleShardOperationRequestBuilder<ExplainRequest,ExplainResponse,ExplainRequestBuilder>
-
- org.elasticsearch.action.explain.ExplainRequestBuilder
-
public class ExplainRequestBuilder extends SingleShardOperationRequestBuilder<ExplainRequest,ExplainResponse,ExplainRequestBuilder>
A builder forExplainRequest.
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.ActionRequestBuilder
action, client, request
-
-
Constructor Summary
Constructors Constructor Description ExplainRequestBuilder(ElasticsearchClient client, ExplainAction action, java.lang.String index, java.lang.String type, java.lang.String id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExplainRequestBuildersetFetchSource(boolean fetch)Indicates whether the response should contain the stored _sourceExplainRequestBuildersetFetchSource(java.lang.String[] includes, java.lang.String[] excludes)Indicate that _source should be returned, with an "include" and/or "exclude" set which can include simple wildcard elements.ExplainRequestBuildersetFetchSource(java.lang.String include, java.lang.String exclude)Indicate that _source should be returned, with an "include" and/or "exclude" set which can include simple wildcard elements.ExplainRequestBuildersetId(java.lang.String id)Sets the id to get a score explanation for.ExplainRequestBuildersetParent(java.lang.String parent)Simple sets the routing.ExplainRequestBuildersetPreference(java.lang.String preference)Sets the shard preference.ExplainRequestBuildersetQuery(QueryBuilder query)Sets the query to get a score explanation for.ExplainRequestBuildersetRouting(java.lang.String routing)Sets the routing for sharding.ExplainRequestBuildersetStoredFields(java.lang.String... fields)Explicitly specify the stored fields that will be returned for the explained document.ExplainRequestBuildersetType(java.lang.String type)Sets the type to get a score explanation for.-
Methods inherited from class org.elasticsearch.action.support.single.shard.SingleShardOperationRequestBuilder
setIndex
-
-
-
-
Constructor Detail
-
ExplainRequestBuilder
public ExplainRequestBuilder(ElasticsearchClient client, ExplainAction action, java.lang.String index, java.lang.String type, java.lang.String id)
-
-
Method Detail
-
setType
public ExplainRequestBuilder setType(java.lang.String type)
Sets the type to get a score explanation for.
-
setId
public ExplainRequestBuilder setId(java.lang.String id)
Sets the id to get a score explanation for.
-
setRouting
public ExplainRequestBuilder setRouting(java.lang.String routing)
Sets the routing for sharding.
-
setParent
public ExplainRequestBuilder setParent(java.lang.String parent)
Simple sets the routing. Since the parent is only used to get to the right shard.
-
setPreference
public ExplainRequestBuilder setPreference(java.lang.String preference)
Sets the shard preference.
-
setQuery
public ExplainRequestBuilder setQuery(QueryBuilder query)
Sets the query to get a score explanation for.
-
setStoredFields
public ExplainRequestBuilder setStoredFields(java.lang.String... 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 java.lang.String include, @Nullable java.lang.String 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 _sourceexclude- An optional exclude (optionally wildcarded) pattern to filter the returned _source
-
setFetchSource
public ExplainRequestBuilder setFetchSource(@Nullable java.lang.String[] includes, @Nullable java.lang.String[] 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 _sourceexcludes- An optional list of exclude (optionally wildcarded) pattern to filter the returned _source
-
-