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 class
AnalyzeRequest.NameOrDefinition
-
Nested classes/interfaces inherited from class org.elasticsearch.transport.TransportRequest
TransportRequest.Empty
-
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 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
Modifier and Type Method Description AnalyzeRequest
addCharFilter(java.lang.String charFilter)
AnalyzeRequest
addCharFilter(java.util.Map<java.lang.String,?> charFilter)
AnalyzeRequest
addTokenFilter(java.lang.String tokenFilter)
AnalyzeRequest
addTokenFilter(java.util.Map<java.lang.String,?> tokenFilter)
java.lang.String
analyzer()
AnalyzeRequest
analyzer(java.lang.String analyzer)
java.lang.String[]
attributes()
AnalyzeRequest
attributes(java.lang.String... attributes)
java.util.List<AnalyzeRequest.NameOrDefinition>
charFilters()
boolean
explain()
AnalyzeRequest
explain(boolean explain)
java.lang.String
field()
AnalyzeRequest
field(java.lang.String field)
java.lang.String
normalizer()
AnalyzeRequest
normalizer(java.lang.String normalizer)
void
readFrom(StreamInput in)
Set this object's fields from a StreamInput.java.lang.String[]
text()
AnalyzeRequest
text(java.lang.String... text)
java.util.List<AnalyzeRequest.NameOrDefinition>
tokenFilters()
AnalyzeRequest.NameOrDefinition
tokenizer()
AnalyzeRequest
tokenizer(java.lang.String tokenizer)
AnalyzeRequest
tokenizer(java.util.Map<java.lang.String,?> tokenizer)
XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
ActionRequestValidationException
validate()
void
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.-
Methods inherited from class org.elasticsearch.action.support.single.shard.SingleShardRequest
index, index, indices, indicesOptions, validateNonNullIndex
-
Methods inherited from class org.elasticsearch.action.ActionRequest
getShouldStoreResult
-
Methods inherited from class org.elasticsearch.transport.TransportRequest
getParentTask, setParentTask
-
Methods inherited from class org.elasticsearch.transport.TransportMessage
remoteAddress, remoteAddress
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.tasks.TaskAwareRequest
createTask, getDescription, setParentTask
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
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:
validate
in classActionRequest
-
readFrom
public void readFrom(StreamInput in) throws java.io.IOException
Description copied from interface:Streamable
Set this object's fields from a StreamInput.- Specified by:
readFrom
in interfaceStreamable
- Overrides:
readFrom
in classSingleShardRequest<AnalyzeRequest>
- Throws:
java.io.IOException
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Streamable
Write this object's fields to a StreamOutput.- Specified by:
writeTo
in interfaceStreamable
- Specified by:
writeTo
in interfaceWriteable
- Overrides:
writeTo
in classSingleShardRequest<AnalyzeRequest>
- Throws:
java.io.IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
-