org.elasticsearch.action.admin.indices.analyze
Class AnalyzeRequest
java.lang.Object
org.elasticsearch.action.support.single.custom.SingleCustomOperationRequest
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. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 nametext
- The text to analyze
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