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.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject,org.elasticsearch.core.RefCounted,TaskAwareRequest
public class ValidateQueryRequest
extends BroadcastRequest<ValidateQueryRequest>
implements org.elasticsearch.common.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.EmptyNested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.ReplaceableNested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested 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
indicesFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionValidateQueryRequest(String... indices)Constructs a new validate request against the provided indices. -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether the query should be validated on all shards instead of one random shardvoidallShards(boolean allShards)Indicates whether the query should be validated on all shards instead of one random shardbooleanexplain()Indicates if detailed information about query is requestedvoidexplain(boolean explain)Indicate if detailed information about query is requestedquery()The query to validate.query(QueryBuilder query)booleanrewrite()Indicates whether the query should be rewritten into primitive queriesvoidrewrite(boolean rewrite)Indicates whether the query should be rewritten into primitive queriestoString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)String[]types()Deprecated.Types are in the process of being removed.Deprecated.Types are in the process of being removed.validate()voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastRequest
includeDataStreams, indices, indices, indicesOptions, indicesOptions, timeout, timeoutMethods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResultMethods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTaskMethods inherited from class org.elasticsearch.transport.TransportMessage
decRef, incRef, remoteAddress, remoteAddress, tryIncRefMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.action.IndicesRequest
allowsRemoteIndicesMethods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTaskMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
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:
validatein classBroadcastRequest<ValidateQueryRequest>
-
query
The query to validate. -
query
-
types
Deprecated.Types are in the process of being removed. Instead of using a type, prefer to filter on a field on the document.The types of documents the query will run against. Defaults to all types. -
types
Deprecated.Types are in the process of being removed. Instead of using a type, prefer to filter on a field on the document.The types of documents the query will run against. Defaults to all types. -
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:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classBroadcastRequest<ValidateQueryRequest>- Throws:
IOException
-
toString
- Overrides:
toStringin classTransportRequest
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-