org.elasticsearch.action.percolate
Class PercolateRequest

java.lang.Object
  extended by org.elasticsearch.action.support.single.custom.SingleCustomOperationRequest
      extended by org.elasticsearch.action.percolate.PercolateRequest
All Implemented Interfaces:
ActionRequest, Streamable

public class PercolateRequest
extends SingleCustomOperationRequest


Constructor Summary
PercolateRequest()
           
PercolateRequest(String index, String type)
          Constructs a new percolate request.
 
Method Summary
 void beforeLocalFork()
          Before we fork on a local thread, make sure we copy over the bytes if they are unsafe
 String index()
           
 PercolateRequest index(String index)
           
 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.
 void readFrom(StreamInput in)
           
 BytesReference source()
           
 PercolateRequest source(byte[] source)
           
 PercolateRequest source(byte[] source, int offset, int length)
           
 PercolateRequest source(byte[] source, int offset, int length, boolean unsafe)
           
 PercolateRequest source(BytesReference source, boolean unsafe)
           
 PercolateRequest source(Map source)
           
 PercolateRequest source(Map source, XContentType contentType)
           
 PercolateRequest source(String source)
           
 PercolateRequest source(XContentBuilder sourceBuilder)
           
 String type()
           
 PercolateRequest type(String type)
           
 ActionRequestValidationException validate()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class org.elasticsearch.action.support.single.custom.SingleCustomOperationRequest
listenerThreaded, listenerThreaded, operationThreaded, operationThreaded, preferLocalShard
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PercolateRequest

public PercolateRequest()

PercolateRequest

public PercolateRequest(String index,
                        String type)
Constructs a new percolate request.

Parameters:
index - The index name
type - The document type
Method Detail

index

public PercolateRequest index(String index)

type

public PercolateRequest type(String type)

index

public String index()

type

public 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 BytesReference source()

source

@Required
public PercolateRequest source(Map source)
                        throws ElasticSearchGenerationException
Throws:
ElasticSearchGenerationException

source

@Required
public PercolateRequest source(Map source,
                                        XContentType contentType)
                        throws ElasticSearchGenerationException
Throws:
ElasticSearchGenerationException

source

@Required
public PercolateRequest source(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)

source

@Required
public PercolateRequest source(BytesReference source,
                                        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 IOException
Specified by:
readFrom in interface Streamable
Overrides:
readFrom in class SingleCustomOperationRequest
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Specified by:
writeTo in interface Streamable
Overrides:
writeTo in class SingleCustomOperationRequest
Throws:
IOException


Copyright © 2009-2012. All Rights Reserved.