public class PercolateRequest extends ActionRequest<PercolateRequest> implements IndicesRequest.Replaceable
TransportRequest.Empty
IndicesRequest.Replaceable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String[] |
indices |
Constructor and Description |
---|
PercolateRequest() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
documentType()
Getter for
documentType(String) |
PercolateRequest |
documentType(java.lang.String type)
Sets the type of the document to percolate.
|
GetRequest |
getRequest()
Getter for
getRequest(GetRequest) |
PercolateRequest |
getRequest(GetRequest getRequest)
This defines where to fetch the document to be percolated from, which is an alternative of defining the document
to percolate in the request body.
|
java.lang.String[] |
indices()
Returns the array of indices that the action relates to
|
PercolateRequest |
indices(java.lang.String... indices)
Sets the indices that the action relates to.
|
IndicesOptions |
indicesOptions()
Returns the indices options used to resolve indices.
|
PercolateRequest |
indicesOptions(IndicesOptions indicesOptions) |
boolean |
onlyCount()
Getter for
onlyCount(boolean) |
PercolateRequest |
onlyCount(boolean onlyCount)
Sets whether this percolate request should only count the number of percolator queries that matches with
the document being percolated and don't keep track of the actual queries that have matched.
|
java.lang.String |
preference()
Getter for
preference(String) |
PercolateRequest |
preference(java.lang.String preference)
Sets the preference to execute the search.
|
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
java.lang.String |
routing()
Getter for
routing(String) |
PercolateRequest |
routing(java.lang.String routing)
A comma separated list of routing values to control the shards the search will be executed on.
|
BytesReference |
source() |
PercolateRequest |
source(byte[] document)
Raw version of
source(PercolateSourceBuilder) |
PercolateRequest |
source(byte[] source,
int offset,
int length)
Raw version of
source(PercolateSourceBuilder) |
PercolateRequest |
source(BytesReference source)
Raw version of
source(PercolateSourceBuilder) |
PercolateRequest |
source(java.util.Map document)
Raw version of
source(PercolateSourceBuilder) |
PercolateRequest |
source(java.util.Map document,
XContentType contentType)
Raw version of
source(PercolateSourceBuilder) |
PercolateRequest |
source(PercolateSourceBuilder sourceBuilder)
Sets the request body definition for this percolate request as raw bytes.
|
PercolateRequest |
source(java.lang.String document)
Raw version of
source(PercolateSourceBuilder) |
PercolateRequest |
source(XContentBuilder documentBuilder)
Raw version of
source(PercolateSourceBuilder) |
ActionRequestValidationException |
validate() |
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
createTask, getDescription
remoteAddress, remoteAddress
public java.lang.String[] indices()
IndicesRequest
indices
in interface IndicesRequest
public final PercolateRequest indices(java.lang.String... indices)
IndicesRequest.Replaceable
indices
in interface IndicesRequest.Replaceable
public IndicesOptions indicesOptions()
IndicesRequest
indicesOptions
in interface IndicesRequest
public PercolateRequest indicesOptions(IndicesOptions indicesOptions)
public java.lang.String documentType()
documentType(String)
public PercolateRequest documentType(java.lang.String type)
public java.lang.String routing()
routing(String)
public PercolateRequest routing(java.lang.String routing)
public java.lang.String preference()
preference(String)
public PercolateRequest preference(java.lang.String preference)
public GetRequest getRequest()
getRequest(GetRequest)
public PercolateRequest getRequest(GetRequest getRequest)
public BytesReference source()
public PercolateRequest source(java.util.Map document) throws ElasticsearchGenerationException
source(PercolateSourceBuilder)
ElasticsearchGenerationException
public PercolateRequest source(java.util.Map document, XContentType contentType) throws ElasticsearchGenerationException
source(PercolateSourceBuilder)
ElasticsearchGenerationException
public PercolateRequest source(java.lang.String document)
source(PercolateSourceBuilder)
public PercolateRequest source(XContentBuilder documentBuilder)
source(PercolateSourceBuilder)
public PercolateRequest source(byte[] document)
source(PercolateSourceBuilder)
public PercolateRequest source(byte[] source, int offset, int length)
source(PercolateSourceBuilder)
public PercolateRequest source(BytesReference source)
source(PercolateSourceBuilder)
public PercolateRequest source(PercolateSourceBuilder sourceBuilder)
public boolean onlyCount()
onlyCount(boolean)
public PercolateRequest onlyCount(boolean onlyCount)
public ActionRequestValidationException validate()
validate
in class ActionRequest<PercolateRequest>
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
readFrom
in class ActionRequest<PercolateRequest>
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
writeTo
in class ActionRequest<PercolateRequest>
java.io.IOException