public class PercolateRequest extends BroadcastRequest<PercolateRequest> implements CompositeIndicesRequest
TransportRequest.Empty
IndicesRequest.Replaceable
indices
headers
Constructor and Description |
---|
PercolateRequest()
Constructor only for internal usage.
|
Modifier and Type | Method and Description |
---|---|
String |
documentType()
Getter for
documentType(String) |
PercolateRequest |
documentType(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.
|
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.
|
String |
preference()
Getter for
preference(String) |
PercolateRequest |
preference(String preference)
Sets the preference to execute the search.
|
void |
readFrom(StreamInput in) |
String |
routing()
Getter for
routing(String) |
PercolateRequest |
routing(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(Map document)
Raw version of
source(PercolateSourceBuilder) |
PercolateRequest |
source(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(String document)
Raw version of
source(PercolateSourceBuilder) |
PercolateRequest |
source(XContentBuilder documentBuilder)
Raw version of
source(PercolateSourceBuilder) |
List<? extends IndicesRequest> |
subRequests()
Returns the subrequests that a composite request is composed of
|
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 List<? extends IndicesRequest> subRequests()
CompositeIndicesRequest
subRequests
in interface CompositeIndicesRequest
public String documentType()
documentType(String)
public PercolateRequest documentType(String type)
public String routing()
routing(String)
public PercolateRequest routing(String routing)
public String preference()
preference(String)
public PercolateRequest preference(String preference)
public GetRequest getRequest()
getRequest(GetRequest)
public PercolateRequest getRequest(GetRequest getRequest)
public BytesReference source()
public PercolateRequest source(Map document) throws ElasticsearchGenerationException
source(PercolateSourceBuilder)
ElasticsearchGenerationException
public PercolateRequest source(Map document, XContentType contentType) throws ElasticsearchGenerationException
source(PercolateSourceBuilder)
ElasticsearchGenerationException
public PercolateRequest source(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 BroadcastRequest<PercolateRequest>
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class BroadcastRequest<PercolateRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class BroadcastRequest<PercolateRequest>
IOException
Copyright © 2009–2017. All rights reserved.