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(String text)
          Constructs a new analyzer request for the provided text.
AnalyzeRequest(String index, String text)
          Constructs a new analyzer request for the provided index and text.
 
Method Summary
 String analyzer()
           
 AnalyzeRequest analyzer(String analyzer)
           
 String field()
           
 AnalyzeRequest field(String field)
           
 String index()
           
 AnalyzeRequest index(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)
           
 String text()
           
 String[] tokenFilters()
           
 AnalyzeRequest tokenFilters(String... tokenFilters)
           
 String tokenizer()
           
 AnalyzeRequest tokenizer(String tokenizer)
           
 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(String text)
Constructs a new analyzer request for the provided text.

Parameters:
text - The text to analyze

AnalyzeRequest

public AnalyzeRequest(@Nullable
                      String index,
                      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 String text()

index

public AnalyzeRequest index(String index)

index

public String index()

analyzer

public AnalyzeRequest analyzer(String analyzer)

analyzer

public String analyzer()

tokenizer

public AnalyzeRequest tokenizer(String tokenizer)

tokenizer

public String tokenizer()

tokenFilters

public AnalyzeRequest tokenFilters(String... tokenFilters)

tokenFilters

public String[] tokenFilters()

field

public AnalyzeRequest field(String field)

field

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