org.elasticsearch.action.percolate
Class PercolateRequest
java.lang.Object
org.elasticsearch.action.support.single.custom.SingleCustomOperationRequest
org.elasticsearch.action.percolate.PercolateRequest
- All Implemented Interfaces:
- ActionRequest, Streamable
public class PercolateRequest
- extends SingleCustomOperationRequest
Constructor Summary |
PercolateRequest(java.lang.String index,
java.lang.String type)
Constructs a new percolate request. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PercolateRequest
public PercolateRequest(java.lang.String index,
java.lang.String type)
- Constructs a new percolate request.
- Parameters:
index
- The index nametype
- The document type
index
public PercolateRequest index(java.lang.String index)
type
public PercolateRequest type(java.lang.String type)
index
public java.lang.String index()
type
public java.lang.String type()
beforeLocalFork
public void beforeLocalFork()
- Before we fork on a local thread, make sure we copy over the bytes if they are unsafe
- Overrides:
beforeLocalFork
in class SingleCustomOperationRequest
source
public byte[] source()
unsafeSource
public byte[] unsafeSource()
unsafeSourceOffset
public int unsafeSourceOffset()
unsafeSourceLength
public int unsafeSourceLength()
source
@Required
public PercolateRequest source(java.util.Map source)
throws ElasticSearchGenerationException
- Throws:
ElasticSearchGenerationException
source
@Required
public PercolateRequest source(java.util.Map source,
XContentType contentType)
throws ElasticSearchGenerationException
- Throws:
ElasticSearchGenerationException
source
@Required
public PercolateRequest source(java.lang.String source)
source
@Required
public PercolateRequest source(XContentBuilder sourceBuilder)
source
public PercolateRequest source(byte[] source)
source
@Required
public PercolateRequest source(byte[] source,
int offset,
int length)
source
@Required
public PercolateRequest source(byte[] source,
int offset,
int length,
boolean unsafe)
preferLocal
public PercolateRequest preferLocal(boolean preferLocal)
- if this operation hits a node with a local relevant shard, should it be preferred
to be executed on, or just do plain round robin. Defaults to true
- Overrides:
preferLocal
in class SingleCustomOperationRequest
validate
public ActionRequestValidationException validate()
- Specified by:
validate
in interface ActionRequest
- Overrides:
validate
in class SingleCustomOperationRequest
readFrom
public void readFrom(StreamInput in)
throws java.io.IOException
- Specified by:
readFrom
in interface Streamable
- Overrides:
readFrom
in class SingleCustomOperationRequest
- Throws:
java.io.IOException
writeTo
public void writeTo(StreamOutput out)
throws java.io.IOException
- Specified by:
writeTo
in interface Streamable
- Overrides:
writeTo
in class SingleCustomOperationRequest
- Throws:
java.io.IOException