public class ExplainRequestBuilder extends SingleShardOperationRequestBuilder<ExplainRequest,ExplainResponse,ExplainRequestBuilder>
ExplainRequest
.action, client, request
Constructor and Description |
---|
ExplainRequestBuilder(ElasticsearchClient client,
ExplainAction action,
String index,
String type,
String id) |
Modifier and Type | Method and Description |
---|---|
protected ExplainRequest |
beforeExecute(ExplainRequest request)
A callback to additionally process the request before its executed
|
ExplainRequestBuilder |
setFetchSource(boolean fetch)
Indicates whether the response should contain the stored _source
|
ExplainRequestBuilder |
setFetchSource(String[] includes,
String[] excludes)
Indicate that _source should be returned, with an "include" and/or "exclude" set which can include simple wildcard
elements.
|
ExplainRequestBuilder |
setFetchSource(String include,
String exclude)
Indicate that _source should be returned, with an "include" and/or "exclude" set which can include simple wildcard
elements.
|
ExplainRequestBuilder |
setFields(String... fields)
Explicitly specify the fields that will be returned for the explained document.
|
ExplainRequestBuilder |
setId(String id)
Sets the id to get a score explanation for.
|
ExplainRequestBuilder |
setParent(String parent)
Simple sets the routing.
|
ExplainRequestBuilder |
setPreference(String preference)
Sets the shard preference.
|
ExplainRequestBuilder |
setQuery(BytesReference query)
Sets the query to get a score explanation for.
|
ExplainRequestBuilder |
setQuery(QueryBuilder query)
Sets the query to get a score explanation for.
|
ExplainRequestBuilder |
setRouting(String routing)
Sets the routing for sharding.
|
ExplainRequestBuilder |
setSource(BytesReference source)
Sets the full source of the explain request (for example, wrapping an actual query).
|
ExplainRequestBuilder |
setType(String type)
Sets the type to get a score explanation for.
|
setIndex, setOperationThreaded
public ExplainRequestBuilder(ElasticsearchClient client, ExplainAction action, String index, String type, String id)
public ExplainRequestBuilder setType(String type)
public ExplainRequestBuilder setId(String id)
public ExplainRequestBuilder setRouting(String routing)
public ExplainRequestBuilder setParent(String parent)
public ExplainRequestBuilder setPreference(String preference)
public ExplainRequestBuilder setQuery(QueryBuilder query)
public ExplainRequestBuilder setQuery(BytesReference query)
public ExplainRequestBuilder setFields(String... fields)
public ExplainRequestBuilder setFetchSource(boolean fetch)
public ExplainRequestBuilder setFetchSource(@Nullable String include, @Nullable String exclude)
include
- An optional include (optionally wildcarded) pattern to filter the returned _sourceexclude
- An optional exclude (optionally wildcarded) pattern to filter the returned _sourcepublic ExplainRequestBuilder setFetchSource(@Nullable String[] includes, @Nullable String[] excludes)
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 _sourcepublic ExplainRequestBuilder setSource(BytesReference source)
protected ExplainRequest beforeExecute(ExplainRequest request)
ActionRequestBuilder
beforeExecute
in class ActionRequestBuilder<ExplainRequest,ExplainResponse,ExplainRequestBuilder>
request
- RequestCopyright © 2009–2016. All rights reserved.