public class ValidateQueryRequest extends BroadcastOperationRequest<ValidateQueryRequest>
The request requires the query source to be set either using source(QuerySourceBuilder)
,
or source(byte[])
.
TransportRequest.Empty
IndicesRequest.Replaceable
indices
Constructor and Description |
---|
ValidateQueryRequest(String... indices)
Constructs a new validate request against the provided indices.
|
Modifier and Type | Method and Description |
---|---|
protected void |
beforeStart() |
boolean |
explain()
Indicates if detailed information about query is requested
|
void |
explain(boolean explain)
Indicate if detailed information about query is requested
|
void |
readFrom(StreamInput in) |
BytesReference |
source()
The source to execute.
|
ValidateQueryRequest |
source(byte[] source)
The source to validate.
|
ValidateQueryRequest |
source(byte[] source,
int offset,
int length,
boolean unsafe)
The source to validate.
|
ValidateQueryRequest |
source(BytesReference source,
boolean unsafe)
The source to validate.
|
ValidateQueryRequest |
source(Map source)
The source to execute in the form of a map.
|
ValidateQueryRequest |
source(QuerySourceBuilder sourceBuilder) |
ValidateQueryRequest |
source(String source)
The query source to validate.
|
ValidateQueryRequest |
source(XContentBuilder builder) |
String |
toString() |
String[] |
types()
The types of documents the query will run against.
|
ValidateQueryRequest |
types(String... types)
The types of documents the query will run against.
|
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out) |
beforeLocalFork, indices, indices, indicesOptions, indicesOptions
listenerThreaded, listenerThreaded
getHeader, getHeaders, hasHeader, putHeader, remoteAddress, remoteAddress
contextSize, copyContextFrom, getContext, getFromContext, getFromContext, hasInContext, isContextEmpty, putAllInContext, putInContext
public ValidateQueryRequest(String... indices)
public ActionRequestValidationException validate()
validate
in class BroadcastOperationRequest<ValidateQueryRequest>
protected void beforeStart()
beforeStart
in class BroadcastOperationRequest<ValidateQueryRequest>
public BytesReference source()
public ValidateQueryRequest source(QuerySourceBuilder sourceBuilder)
public ValidateQueryRequest source(Map source)
public ValidateQueryRequest source(XContentBuilder builder)
public ValidateQueryRequest source(String source)
source(byte[])
or source(QuerySourceBuilder)
.public ValidateQueryRequest source(byte[] source)
public ValidateQueryRequest source(byte[] source, int offset, int length, boolean unsafe)
public ValidateQueryRequest source(BytesReference source, boolean unsafe)
public String[] types()
public ValidateQueryRequest types(String... types)
public void explain(boolean explain)
public boolean explain()
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class BroadcastOperationRequest<ValidateQueryRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class BroadcastOperationRequest<ValidateQueryRequest>
IOException
Copyright © 2009–2015. All rights reserved.