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.util.concurrent.RefCounted
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
,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.Empty
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
Nested 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.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.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
Constructors Constructor Description ValidateQueryRequest()
ValidateQueryRequest(java.lang.String... indices)
Constructs a new validate request against the provided indices.ValidateQueryRequest(StreamInput in)
-
Method Summary
Modifier and Type Method Description boolean
allShards()
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 requestedQueryBuilder
query()
The query to validate.ValidateQueryRequest
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 queriesjava.lang.String
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
java.lang.String[]
types()
Deprecated.Types are in the process of being removed.ValidateQueryRequest
types(java.lang.String... types)
Deprecated.Types are in the process of being removed.ActionRequestValidationException
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, 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.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
ValidateQueryRequest
public ValidateQueryRequest() -
ValidateQueryRequest
- Throws:
java.io.IOException
-
ValidateQueryRequest
public ValidateQueryRequest(java.lang.String... indices)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
-
types
@Deprecated public java.lang.String[] 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:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classBroadcastRequest<ValidateQueryRequest>
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toString
in classTransportRequest
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
java.io.IOException
-