Class CategorizationAnalyzerConfig
java.lang.Object
org.elasticsearch.client.ml.job.config.CategorizationAnalyzerConfig
- All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentFragment
public class CategorizationAnalyzerConfig
extends Object
implements org.elasticsearch.xcontent.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 the char_filters, tokenizer
and token_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 ClassesModifier and TypeClassDescriptionstatic classstatic final classSimple store of either a name of a built-in analyzer element or a custom definition.Nested 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
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Method Summary
Modifier and TypeMethodDescriptionbooleaninthashCode()org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragment
isFragment
-
Field Details
-
CATEGORIZATION_ANALYZER
public static final org.elasticsearch.xcontent.ParseField CATEGORIZATION_ANALYZER
-
-
Method Details
-
getAnalyzer
-
getCharFilters
-
getTokenizer
-
getTokenFilters
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-