public class ValidateQueryRequest extends BroadcastRequest<ValidateQueryRequest>
The request requires the query to be set using query(QueryBuilder)
TransportRequest.Empty
IndicesRequest.Replaceable
indices
Constructor and Description |
---|
ValidateQueryRequest() |
ValidateQueryRequest(java.lang.String... indices)
Constructs a new validate request against the provided indices.
|
Modifier and Type | Method and Description |
---|---|
boolean |
allShards()
Indicates whether the query should be validated on all shards instead of one random shard
|
void |
allShards(boolean allShards)
Indicates whether the query should be validated on all shards instead of one random shard
|
boolean |
explain()
Indicates if detailed information about query is requested
|
void |
explain(boolean explain)
Indicate if detailed information about query is requested
|
QueryBuilder |
query()
The query to validate.
|
ValidateQueryRequest |
query(QueryBuilder query) |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
boolean |
rewrite()
Indicates whether the query should be rewritten into primitive queries
|
void |
rewrite(boolean rewrite)
Indicates whether the query should be rewritten into primitive queries
|
java.lang.String |
toString() |
java.lang.String[] |
types()
The types of documents the query will run against.
|
ValidateQueryRequest |
types(java.lang.String... types)
The types of documents the query will run against.
|
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
indices, indices, indicesOptions, indicesOptions
getShouldStoreResult
getParentTask, setParentTask
remoteAddress, remoteAddress
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createTask, getDescription, setParentTask
public ValidateQueryRequest()
public ValidateQueryRequest(java.lang.String... indices)
public ActionRequestValidationException validate()
validate
in class BroadcastRequest<ValidateQueryRequest>
public QueryBuilder query()
public ValidateQueryRequest query(QueryBuilder query)
public java.lang.String[] types()
public ValidateQueryRequest types(java.lang.String... types)
public void explain(boolean explain)
public boolean explain()
public void rewrite(boolean rewrite)
public boolean rewrite()
public void allShards(boolean allShards)
public boolean allShards()
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class BroadcastRequest<ValidateQueryRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class BroadcastRequest<ValidateQueryRequest>
java.io.IOException
public java.lang.String toString()
toString
in class java.lang.Object