Package org.elasticsearch.action.explain
Class ExplainRequest
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportRequest
-
- org.elasticsearch.action.ActionRequest
-
- org.elasticsearch.action.support.single.shard.SingleShardRequest<ExplainRequest>
-
- org.elasticsearch.action.explain.ExplainRequest
-
- All Implemented Interfaces:
IndicesRequest,Streamable,Writeable,ToXContent,ToXContentObject,TaskAwareRequest
public class ExplainRequest extends SingleShardRequest<ExplainRequest> implements ToXContentObject
Explain request encapsulating the explain query and document identifier to get an explanation for.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.support.single.shard.SingleShardRequest
index, INDICES_OPTIONS
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description ExplainRequest()ExplainRequest(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 FetchSourceContextfetchSourceContext()ExplainRequestfetchSourceContext(FetchSourceContext context)Allows setting theFetchSourceContextfor this request, controlling if and how _source should be returned.AliasFilterfilteringAlias()ExplainRequestfilteringAlias(AliasFilter filteringAlias)java.lang.Stringid()ExplainRequestid(java.lang.String id)ExplainRequestparent(java.lang.String parent)Simple sets the routing.java.lang.Stringpreference()ExplainRequestpreference(java.lang.String preference)QueryBuilderquery()ExplainRequestquery(QueryBuilder query)voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.java.lang.Stringrouting()ExplainRequestrouting(java.lang.String routing)java.lang.String[]storedFields()ExplainRequeststoredFields(java.lang.String[] fields)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)java.lang.Stringtype()ExplainRequesttype(java.lang.String type)ActionRequestValidationExceptionvalidate()voidwriteTo(StreamOutput out)Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.action.support.single.shard.SingleShardRequest
index, index, indices, indicesOptions, validateNonNullIndex
-
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Method Detail
-
type
public java.lang.String type()
-
type
public ExplainRequest type(java.lang.String type)
-
id
public java.lang.String id()
-
id
public ExplainRequest id(java.lang.String id)
-
routing
public java.lang.String routing()
-
routing
public ExplainRequest routing(java.lang.String routing)
-
parent
public ExplainRequest parent(java.lang.String parent)
Simple sets the routing. Since the parent is only used to get to the right shard.
-
preference
public java.lang.String preference()
-
preference
public ExplainRequest preference(java.lang.String preference)
-
query
public QueryBuilder query()
-
query
public ExplainRequest query(QueryBuilder query)
-
fetchSourceContext
public ExplainRequest fetchSourceContext(FetchSourceContext context)
Allows setting theFetchSourceContextfor this request, controlling if and how _source should be returned.
-
fetchSourceContext
public FetchSourceContext fetchSourceContext()
-
storedFields
public java.lang.String[] storedFields()
-
storedFields
public ExplainRequest storedFields(java.lang.String[] fields)
-
filteringAlias
public AliasFilter filteringAlias()
-
filteringAlias
public ExplainRequest filteringAlias(AliasFilter filteringAlias)
-
validate
public ActionRequestValidationException validate()
- Specified by:
validatein classActionRequest
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classSingleShardRequest<ExplainRequest>- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classSingleShardRequest<ExplainRequest>- Throws:
java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
-