Package org.elasticsearch.client.indices
Class AnalyzeRequest
- java.lang.Object
-
- org.elasticsearch.client.indices.AnalyzeRequest
-
- All Implemented Interfaces:
Validatable,ToXContent,ToXContentObject
public class AnalyzeRequest extends Object implements Validatable, ToXContentObject
A request to analyze text
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnalyzeRequest.CustomAnalyzerBuilderHelper class to build custom analyzer definitions-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Fields inherited from interface org.elasticsearch.client.Validatable
EMPTY
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringanalyzer()Returns the named analyzer used for analysis, if definedString[]attributes()AnalyzeRequestattributes(String... attributes)static AnalyzeRequest.CustomAnalyzerBuilderbuildCustomAnalyzer(String tokenizer)Analyzes text using a custom analyzer built from global componentsstatic AnalyzeRequest.CustomAnalyzerBuilderbuildCustomAnalyzer(String index, String tokenizer)Analyzes text using a custom analyzer built from components defined on an indexstatic AnalyzeRequest.CustomAnalyzerBuilderbuildCustomAnalyzer(String index, Map<String,Object> tokenizerSettings)Analyzes text using a custom analyzer built from components defined on an indexstatic AnalyzeRequest.CustomAnalyzerBuilderbuildCustomAnalyzer(Map<String,Object> tokenizerSettings)Analyzes text using a custom analyzer built from global componentsstatic AnalyzeRequest.CustomAnalyzerBuilderbuildCustomNormalizer()Analyzes text using a custom normalizer built from global componentsstatic AnalyzeRequest.CustomAnalyzerBuilderbuildCustomNormalizer(String index)Analyzes text using a custom normalizer built from components defined on an indexList<org.elasticsearch.client.indices.AnalyzeRequest.NameOrDefinition>charFilters()Returns the custom character filters used for analysis, if definedbooleanexplain()AnalyzeRequestexplain(boolean explain)Set whether or not detailed explanations of analysis should be returnedStringfield()Returns the field to take an Analyzer from, if definedStringindex()Returns the index that the request should be executed against, ornullif no index is specifiedStringnormalizer()Returns the named tokenizer used for analysis, if definedString[]text()Returns the text to be analyzedList<org.elasticsearch.client.indices.AnalyzeRequest.NameOrDefinition>tokenFilters()Returns the custom token filters used for analysis, if definedorg.elasticsearch.client.indices.AnalyzeRequest.NameOrDefinitiontokenizer()Returns a custom Tokenizer used for analysis, if definedXContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)static AnalyzeRequestwithField(String index, String field, String... text)Analyzes text using the analyzer defined on a specific field within an indexstatic AnalyzeRequestwithGlobalAnalyzer(String analyzer, String... text)Analyzes text using a global analyzerstatic AnalyzeRequestwithIndexAnalyzer(String index, String analyzer, String... text)Analyzes text using a named analyzer on an indexstatic AnalyzeRequestwithNormalizer(String index, String normalizer, String... text)Analyzes text using a named normalizer on an index-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Methods inherited from interface org.elasticsearch.client.Validatable
validate
-
-
-
-
Method Detail
-
withGlobalAnalyzer
public static AnalyzeRequest withGlobalAnalyzer(String analyzer, String... text)
Analyzes text using a global analyzer
-
buildCustomAnalyzer
public static AnalyzeRequest.CustomAnalyzerBuilder buildCustomAnalyzer(String tokenizer)
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
public static AnalyzeRequest withIndexAnalyzer(String index, String analyzer, String... text)
Analyzes text using a named analyzer on an index
-
withField
public static AnalyzeRequest withField(String index, String field, String... text)
Analyzes text using the analyzer defined on a specific field within an index
-
withNormalizer
public static AnalyzeRequest withNormalizer(String index, String normalizer, String... text)
Analyzes text using a named normalizer on an index
-
buildCustomNormalizer
public static AnalyzeRequest.CustomAnalyzerBuilder buildCustomNormalizer()
Analyzes text using a custom normalizer built from global components
-
buildCustomNormalizer
public static AnalyzeRequest.CustomAnalyzerBuilder buildCustomNormalizer(String index)
Analyzes text using a custom normalizer built from components defined on an index
-
index
public String index()
Returns the index that the request should be executed against, ornullif no index is specified
-
text
public String[] text()
Returns the text to be analyzed
-
analyzer
public String analyzer()
Returns the named analyzer used for analysis, if defined
-
normalizer
public String 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
public List<org.elasticsearch.client.indices.AnalyzeRequest.NameOrDefinition> tokenFilters()
Returns the custom token filters used for analysis, if defined
-
charFilters
public List<org.elasticsearch.client.indices.AnalyzeRequest.NameOrDefinition> charFilters()
Returns the custom character filters used for analysis, if defined
-
field
public String field()
Returns the field to take an Analyzer from, if defined
-
explain
public AnalyzeRequest explain(boolean explain)
Set whether or not detailed explanations of analysis should be returned
-
explain
public boolean explain()
-
attributes
public AnalyzeRequest attributes(String... attributes)
-
attributes
public String[] attributes()
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
-