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
Modifier and Type Method Description FetchSourceContext
fetchSourceContext()
ExplainRequest
fetchSourceContext(FetchSourceContext context)
Allows setting theFetchSourceContext
for this request, controlling if and how _source should be returned.AliasFilter
filteringAlias()
ExplainRequest
filteringAlias(AliasFilter filteringAlias)
java.lang.String
id()
ExplainRequest
id(java.lang.String id)
ExplainRequest
parent(java.lang.String parent)
Simple sets the routing.java.lang.String
preference()
ExplainRequest
preference(java.lang.String preference)
QueryBuilder
query()
ExplainRequest
query(QueryBuilder query)
void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.java.lang.String
routing()
ExplainRequest
routing(java.lang.String routing)
java.lang.String[]
storedFields()
ExplainRequest
storedFields(java.lang.String[] fields)
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
java.lang.String
type()
ExplainRequest
type(java.lang.String type)
ActionRequestValidationException
validate()
void
writeTo(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 theFetchSourceContext
for 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:
validate
in classActionRequest
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classSingleShardRequest<ExplainRequest>
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classSingleShardRequest<ExplainRequest>
- Throws:
java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
-