public class ValidateQueryRequest extends BroadcastRequest<ValidateQueryRequest>
The request requires the query source to be set either using source(QuerySourceBuilder)
,
or source(byte[])
.
TransportRequest.Empty
IndicesRequest.Replaceable
indices
headers
Constructor and Description |
---|
ValidateQueryRequest() |
ValidateQueryRequest(String... indices)
Constructs a new validate request against the provided indices.
|
Modifier and Type | Method and Description |
---|---|
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) |
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
|
BytesReference |
source()
The source to execute.
|
ValidateQueryRequest |
source(byte[] source)
The source to validate.
|
ValidateQueryRequest |
source(byte[] source,
int offset,
int length)
The source to validate.
|
ValidateQueryRequest |
source(BytesReference source)
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) |
indices, indices, indicesOptions, indicesOptions
createTask, getDescription
remoteAddress, remoteAddress
contextSize, copyContextAndHeadersFrom, copyContextFrom, copyHeadersFrom, getContext, getFromContext, getFromContext, getHeader, getHeaders, hasHeader, hasInContext, isContextEmpty, putAllInContext, putHeader, putInContext
public ValidateQueryRequest()
public ValidateQueryRequest(String... indices)
public ActionRequestValidationException validate()
validate
in class BroadcastRequest<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)
public ValidateQueryRequest source(BytesReference source)
public String[] types()
public ValidateQueryRequest types(String... types)
public void explain(boolean explain)
public boolean explain()
public void rewrite(boolean rewrite)
public boolean rewrite()
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class BroadcastRequest<ValidateQueryRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class BroadcastRequest<ValidateQueryRequest>
IOException
Copyright © 2009–2016. All rights reserved.