public class PercolateRequest extends BroadcastOperationRequest<PercolateRequest> implements CompositeIndicesRequest
TransportRequest.Empty
IndicesRequest.Replaceable
indices
Constructor and Description |
---|
PercolateRequest()
Constructor only for internal usage.
|
Modifier and Type | Method and Description |
---|---|
void |
beforeLocalFork()
Before we fork on a local thread, make sure we copy over the bytes if they are unsafe
|
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(byte[] source,
int offset,
int length,
boolean unsafe)
Raw version of
source(PercolateSourceBuilder) |
PercolateRequest |
source(BytesReference source,
boolean unsafe)
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) |
beforeStart, indices, indices, indicesOptions, indicesOptions
listenerThreaded, listenerThreaded
getHeader, getHeaders, hasHeader, putHeader, remoteAddress, remoteAddress
contextSize, copyContextFrom, getContext, getFromContext, getFromContext, hasInContext, isContextEmpty, putAllInContext, 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 void beforeLocalFork()
beforeLocalFork
in class BroadcastOperationRequest<PercolateRequest>
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(byte[] source, int offset, int length, boolean unsafe)
source(PercolateSourceBuilder)
public PercolateRequest source(BytesReference source, boolean unsafe)
source(PercolateSourceBuilder)
public PercolateRequest source(PercolateSourceBuilder sourceBuilder)
public boolean onlyCount()
onlyCount(boolean)
public PercolateRequest onlyCount(boolean onlyCount)
public ActionRequestValidationException validate()
validate
in class BroadcastOperationRequest<PercolateRequest>
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class BroadcastOperationRequest<PercolateRequest>
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class BroadcastOperationRequest<PercolateRequest>
IOException
Copyright © 2009–2015. All rights reserved.