org.elasticsearch.action.admin.indices.analyze
Class AnalyzeRequest

java.lang.Object
  extended by org.elasticsearch.action.support.single.custom.SingleCustomOperationRequest
      extended by org.elasticsearch.action.admin.indices.analyze.AnalyzeRequest
All Implemented Interfaces:
ActionRequest, Streamable

public class AnalyzeRequest
extends SingleCustomOperationRequest

A request to analyze a text associated with a specific index. Allow to provide the actual analyzer name to perform the analysis with.


Constructor Summary
AnalyzeRequest(java.lang.String index, java.lang.String text)
          Constructs a new analyzer request for the provided index and text.
 
Method Summary
 java.lang.String analyzer()
           
 AnalyzeRequest analyzer(java.lang.String analyzer)
           
 java.lang.String field()
           
 AnalyzeRequest field(java.lang.String field)
           
 java.lang.String index()
           
 AnalyzeRequest index(java.lang.String index)
           
 AnalyzeRequest 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)
           
 java.lang.String text()
           
 ActionRequestValidationException validate()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class org.elasticsearch.action.support.single.custom.SingleCustomOperationRequest
beforeLocalFork, 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

AnalyzeRequest

public AnalyzeRequest(java.lang.String index,
                      java.lang.String text)
Constructs a new analyzer request for the provided index and text.

Parameters:
index - The index name
text - The text to analyze
Method Detail

text

public java.lang.String text()

index

public AnalyzeRequest index(java.lang.String index)

index

public java.lang.String index()

analyzer

public AnalyzeRequest analyzer(java.lang.String analyzer)

analyzer

public java.lang.String analyzer()

field

public AnalyzeRequest field(java.lang.String field)

field

public java.lang.String field()

preferLocal

public AnalyzeRequest 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