Class CategorizationAnalyzerConfig
- java.lang.Object
-
- org.elasticsearch.client.ml.job.config.CategorizationAnalyzerConfig
-
- All Implemented Interfaces:
ToXContent,ToXContentFragment
public class CategorizationAnalyzerConfig extends java.lang.Object implements ToXContentFragment
Configuration for the categorization analyzer. The syntax is a subset of what can be supplied to the_analyzeendpoint. To summarize, the first option is to specify the name of an out-of-the-box analyzer:"categorization_analyzer" : "standard"The second option is to specify a custom analyzer by combining thechar_filters,tokenizerandtoken_filtersfields. In turn, each of these can be specified as the name of an out-of-the-box one or as an object defining a custom one. For example:"char_filters" : [ "html_strip", { "type" : "pattern_replace", "pattern": "SQL: .*" } ], "tokenizer" : "thai", "token_filters" : [ "lowercase", { "type" : "pattern_replace", "pattern": "^[0-9].*" } ]
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classCategorizationAnalyzerConfig.Builderstatic classCategorizationAnalyzerConfig.NameOrDefinitionSimple store of either a name of a built-in analyzer element or a custom definition.-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
-
Field Summary
Fields Modifier and Type Field Description static ParseFieldCATEGORIZATION_ANALYZER-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
Modifier and Type Method Description booleanequals(java.lang.Object o)java.lang.StringgetAnalyzer()java.util.List<CategorizationAnalyzerConfig.NameOrDefinition>getCharFilters()java.util.List<CategorizationAnalyzerConfig.NameOrDefinition>getTokenFilters()CategorizationAnalyzerConfig.NameOrDefinitiongetTokenizer()inthashCode()XContentBuildertoXContent(XContentBuilder builder, ToXContent.Params params)-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
-
-
-
Field Detail
-
CATEGORIZATION_ANALYZER
public static final ParseField CATEGORIZATION_ANALYZER
-
-
Method Detail
-
getAnalyzer
public java.lang.String getAnalyzer()
-
getCharFilters
public java.util.List<CategorizationAnalyzerConfig.NameOrDefinition> getCharFilters()
-
getTokenizer
public CategorizationAnalyzerConfig.NameOrDefinition getTokenizer()
-
getTokenFilters
public java.util.List<CategorizationAnalyzerConfig.NameOrDefinition> getTokenFilters()
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-