Class AnalyzeRequest
- java.lang.Object
-
- org.elasticsearch.transport.TransportMessage
-
- org.elasticsearch.transport.TransportRequest
-
- org.elasticsearch.action.ActionRequest
-
- org.elasticsearch.action.support.single.shard.SingleShardRequest<AnalyzeRequest>
-
- org.elasticsearch.action.admin.indices.analyze.AnalyzeRequest
-
- All Implemented Interfaces:
IndicesRequest,Streamable,Writeable,ToXContent,ToXContentObject,TaskAwareRequest
public class AnalyzeRequest extends SingleShardRequest<AnalyzeRequest> implements ToXContentObject
A request to analyze a text associated with a specific index. Allow to provide the actual analyzer name to perform the analysis with.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnalyzeRequest.NameOrDefinition-
Nested classes/interfaces inherited from interface org.elasticsearch.action.IndicesRequest
IndicesRequest.Replaceable
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.action.support.single.shard.SingleShardRequest
index, INDICES_OPTIONS
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description AnalyzeRequest()AnalyzeRequest(java.lang.String index)Constructs a new analyzer request for the provided index.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AnalyzeRequestaddCharFilter(java.lang.String charFilter)AnalyzeRequestaddCharFilter(java.util.Map<java.lang.String,?> charFilter)AnalyzeRequestaddTokenFilter(java.lang.String tokenFilter)AnalyzeRequestaddTokenFilter(java.util.Map<java.lang.String,?> tokenFilter)java.lang.Stringanalyzer()AnalyzeRequestanalyzer(java.lang.String analyzer)java.lang.String[]attributes()AnalyzeRequestattributes(java.lang.String... attributes)java.util.List<AnalyzeRequest.NameOrDefinition>charFilters()booleanexplain()AnalyzeRequestexplain(boolean explain)java.lang.Stringfield()AnalyzeRequestfield(java.lang.String field)java.lang.Stringnormalizer()AnalyzeRequestnormalizer(java.lang.String normalizer)voidreadFrom(StreamInput in)Set this object's fields from a StreamInput.java.lang.String[]text()AnalyzeRequesttext(java.lang.String... text)java.util.List<AnalyzeRequest.NameOrDefinition>tokenFilters()AnalyzeRequest.NameOrDefinitiontokenizer()AnalyzeRequesttokenizer(java.lang.String tokenizer)AnalyzeRequesttokenizer(java.util.Map<java.lang.String,?> tokenizer)XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)ActionRequestValidationExceptionvalidate()voidwriteTo(StreamOutput out)Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class org.elasticsearch.action.support.single.shard.SingleShardRequest
index, index, indices, indicesOptions, validateNonNullIndex
-
Methods inherited from interface org.elasticsearch.common.io.stream.Streamable
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
-
-
-
Method Detail
-
text
public java.lang.String[] text()
-
text
public AnalyzeRequest text(java.lang.String... text)
-
analyzer
public AnalyzeRequest analyzer(java.lang.String analyzer)
-
analyzer
public java.lang.String analyzer()
-
tokenizer
public AnalyzeRequest tokenizer(java.lang.String tokenizer)
-
tokenizer
public AnalyzeRequest tokenizer(java.util.Map<java.lang.String,?> tokenizer)
-
tokenizer
public AnalyzeRequest.NameOrDefinition tokenizer()
-
addTokenFilter
public AnalyzeRequest addTokenFilter(java.lang.String tokenFilter)
-
addTokenFilter
public AnalyzeRequest addTokenFilter(java.util.Map<java.lang.String,?> tokenFilter)
-
tokenFilters
public java.util.List<AnalyzeRequest.NameOrDefinition> tokenFilters()
-
addCharFilter
public AnalyzeRequest addCharFilter(java.util.Map<java.lang.String,?> charFilter)
-
addCharFilter
public AnalyzeRequest addCharFilter(java.lang.String charFilter)
-
charFilters
public java.util.List<AnalyzeRequest.NameOrDefinition> charFilters()
-
field
public AnalyzeRequest field(java.lang.String field)
-
field
public java.lang.String field()
-
explain
public AnalyzeRequest explain(boolean explain)
-
explain
public boolean explain()
-
attributes
public AnalyzeRequest attributes(java.lang.String... attributes)
-
attributes
public java.lang.String[] attributes()
-
normalizer
public java.lang.String normalizer()
-
normalizer
public AnalyzeRequest normalizer(java.lang.String normalizer)
-
validate
public ActionRequestValidationException validate()
- Specified by:
validatein classActionRequest
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:StreamableSet this object's fields from a StreamInput.- Specified by:
readFromin interfaceStreamable- Overrides:
readFromin classSingleShardRequest<AnalyzeRequest>- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:StreamableWrite this object's fields to a StreamOutput.- Specified by:
writeToin interfaceStreamable- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classSingleShardRequest<AnalyzeRequest>- Throws:
java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
-