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_analyze
endpoint. 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
,tokenizer
andtoken_filters
fields. 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 class
CategorizationAnalyzerConfig.Builder
static class
CategorizationAnalyzerConfig.NameOrDefinition
Simple 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 ParseField
CATEGORIZATION_ANALYZER
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
getAnalyzer()
java.util.List<CategorizationAnalyzerConfig.NameOrDefinition>
getCharFilters()
java.util.List<CategorizationAnalyzerConfig.NameOrDefinition>
getTokenFilters()
CategorizationAnalyzerConfig.NameOrDefinition
getTokenizer()
int
hashCode()
XContentBuilder
toXContent(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:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
-