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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 nametext
- The text to analyze
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.