Package org.elasticsearch.client.indices
Class AnalyzeRequest
java.lang.Object
org.elasticsearch.client.indices.AnalyzeRequest
- All Implemented Interfaces:
Validatable
,org.elasticsearch.xcontent.ToXContent
,org.elasticsearch.xcontent.ToXContentObject
public class AnalyzeRequest
extends Object
implements Validatable, org.elasticsearch.xcontent.ToXContentObject
A request to analyze text
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Helper class to build custom analyzer definitionsNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.Params
-
Field Summary
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
Fields inherited from interface org.elasticsearch.client.Validatable
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptionanalyzer()
Returns the named analyzer used for analysis, if definedString[]
attributes
(String... attributes) buildCustomAnalyzer
(String tokenizer) Analyzes text using a custom analyzer built from global componentsbuildCustomAnalyzer
(String index, String tokenizer) Analyzes text using a custom analyzer built from components defined on an indexbuildCustomAnalyzer
(String index, Map<String, Object> tokenizerSettings) Analyzes text using a custom analyzer built from components defined on an indexbuildCustomAnalyzer
(Map<String, Object> tokenizerSettings) Analyzes text using a custom analyzer built from global componentsAnalyzes text using a custom normalizer built from global componentsbuildCustomNormalizer
(String index) Analyzes text using a custom normalizer built from components defined on an indexList<org.elasticsearch.client.indices.AnalyzeRequest.NameOrDefinition>
Returns the custom character filters used for analysis, if definedboolean
explain()
explain
(boolean explain) Set whether or not detailed explanations of analysis should be returnedfield()
Returns the field to take an Analyzer from, if definedindex()
Returns the index that the request should be executed against, ornull
if no index is specifiedReturns the named tokenizer used for analysis, if definedString[]
text()
Returns the text to be analyzedList<org.elasticsearch.client.indices.AnalyzeRequest.NameOrDefinition>
Returns the custom token filters used for analysis, if definedorg.elasticsearch.client.indices.AnalyzeRequest.NameOrDefinition
Returns a custom Tokenizer used for analysis, if definedorg.elasticsearch.xcontent.XContentBuilder
toXContent
(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) static AnalyzeRequest
Analyzes text using the analyzer defined on a specific field within an indexstatic AnalyzeRequest
withGlobalAnalyzer
(String analyzer, String... text) Analyzes text using a global analyzerstatic AnalyzeRequest
withIndexAnalyzer
(String index, String analyzer, String... text) Analyzes text using a named analyzer on an indexstatic AnalyzeRequest
withNormalizer
(String index, String normalizer, String... text) Analyzes text using a named normalizer on an indexMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
Methods inherited from interface org.elasticsearch.client.Validatable
validate
-
Method Details
-
withGlobalAnalyzer
Analyzes text using a global analyzer -
buildCustomAnalyzer
Analyzes text using a custom analyzer built from global components -
buildCustomAnalyzer
public static AnalyzeRequest.CustomAnalyzerBuilder buildCustomAnalyzer(Map<String, Object> tokenizerSettings) Analyzes text using a custom analyzer built from global components -
buildCustomAnalyzer
public static AnalyzeRequest.CustomAnalyzerBuilder buildCustomAnalyzer(String index, String tokenizer) Analyzes text using a custom analyzer built from components defined on an index -
buildCustomAnalyzer
public static AnalyzeRequest.CustomAnalyzerBuilder buildCustomAnalyzer(String index, Map<String, Object> tokenizerSettings) Analyzes text using a custom analyzer built from components defined on an index -
withIndexAnalyzer
Analyzes text using a named analyzer on an index -
withField
Analyzes text using the analyzer defined on a specific field within an index -
withNormalizer
Analyzes text using a named normalizer on an index -
buildCustomNormalizer
Analyzes text using a custom normalizer built from global components -
buildCustomNormalizer
Analyzes text using a custom normalizer built from components defined on an index -
index
Returns the index that the request should be executed against, ornull
if no index is specified -
text
Returns the text to be analyzed -
analyzer
Returns the named analyzer used for analysis, if defined -
normalizer
Returns the named tokenizer used for analysis, if defined -
tokenizer
public org.elasticsearch.client.indices.AnalyzeRequest.NameOrDefinition tokenizer()Returns a custom Tokenizer used for analysis, if defined -
tokenFilters
Returns the custom token filters used for analysis, if defined -
charFilters
Returns the custom character filters used for analysis, if defined -
field
Returns the field to take an Analyzer from, if defined -
explain
Set whether or not detailed explanations of analysis should be returned -
explain
public boolean explain() -
attributes
-
attributes
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceorg.elasticsearch.xcontent.ToXContent
- Throws:
IOException
-