Class ValidateQueryRequest
java.lang.Object
org.elasticsearch.transport.TransportMessage
org.elasticsearch.transport.TransportRequest
org.elasticsearch.action.ActionRequest
org.elasticsearch.action.support.broadcast.BroadcastRequest<ValidateQueryRequest>
org.elasticsearch.action.admin.indices.validate.query.ValidateQueryRequest
- All Implemented Interfaces:
IndicesRequest
,IndicesRequest.Replaceable
,Writeable
,org.elasticsearch.core.RefCounted
,TaskAwareRequest
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentObject
public class ValidateQueryRequest
extends BroadcastRequest<ValidateQueryRequest>
implements org.elasticsearch.xcontent.ToXContentObject
A request to validate a specific query.
The request requires the query to be set using query(QueryBuilder)
-
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.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.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.broadcast.BroadcastRequest
indices
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorDescriptionValidateQueryRequest
(String... indices) Constructs a new validate request against the provided indices. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether the query should be validated on all shards instead of one random shardvoid
allShards
(boolean allShards) Indicates whether the query should be validated on all shards instead of one random shardboolean
explain()
Indicates if detailed information about query is requestedvoid
explain
(boolean explain) Indicate if detailed information about query is requestedquery()
The query to validate.query
(QueryBuilder query) boolean
rewrite()
Indicates whether the query should be rewritten into primitive queriesvoid
rewrite
(boolean rewrite) Indicates whether the query should be rewritten into primitive queriestoString()
org.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) validate()
void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastRequest
includeDataStreams, indices, indices, indicesOptions, indicesOptions, timeout, timeout
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
decRef, hasReferences, incRef, remoteAddress, remoteAddress, tryIncRef
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.action.IndicesRequest.Replaceable
allowsRemoteIndices
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
DEFAULT_INDICES_OPTIONS
-
-
Constructor Details
-
ValidateQueryRequest
public ValidateQueryRequest() -
ValidateQueryRequest
- Throws:
IOException
-
ValidateQueryRequest
Constructs a new validate request against the provided indices. No indices provided means it will run against all indices.
-
-
Method Details
-
validate
- Overrides:
validate
in classBroadcastRequest<ValidateQueryRequest>
-
query
The query to validate. -
query
-
explain
public void explain(boolean explain) Indicate if detailed information about query is requested -
explain
public boolean explain()Indicates if detailed information about query is requested -
rewrite
public void rewrite(boolean rewrite) Indicates whether the query should be rewritten into primitive queries -
rewrite
public boolean rewrite()Indicates whether the query should be rewritten into primitive queries -
allShards
public void allShards(boolean allShards) Indicates whether the query should be validated on all shards instead of one random shard -
allShards
public boolean allShards()Indicates whether the query should be validated on all shards instead of one random shard -
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classBroadcastRequest<ValidateQueryRequest>
- Throws:
IOException
-
toString
- Overrides:
toString
in classTransportRequest
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-