Class Category.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<Category.Builder>
co.elastic.clients.elasticsearch.ml.Category.Builder
- All Implemented Interfaces:
WithJson<Category.Builder>,ObjectBuilder<Category>
- Enclosing class:
- Category
public static class Category.Builder
extends WithJsonObjectBuilderBase<Category.Builder>
implements ObjectBuilder<Category>
Builder for
Category.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds aCategory.final Category.BuildercategoryId(Number value) Required - A unique identifier for the category.final Category.BuilderRequired - A list of examples of actual values that matched the category.final Category.BuilderRequired - A list of examples of actual values that matched the category.final Category.BuildergrokPattern(String value) [experimental] A Grok pattern that could be used in Logstash or an ingest pipeline to extract fields from messages that match the category.final Category.BuilderRequired - Identifier for the anomaly detection job.final Category.BuildermaxMatchingLength(Number value) Required - The maximum length of the fields that matched the category.final Category.Buildermlcategory(String value) Required - API name:mlcategoryfinal Category.BuildernumMatches(Long value) The number of messages that have been matched by this category.final Category.BuilderAPI name:pfinal Category.BuilderpartitionFieldName(String value) If per-partition categorization is enabled, this property identifies the field used to segment the categorization.final Category.BuilderpartitionFieldValue(String value) If per-partition categorization is enabled, this property identifies the value of the partition_field_name for the category.final Category.BuilderpreferredToCategories(String value, String... values) A list of category_id entries that this current category encompasses.final Category.BuilderpreferredToCategories(List<String> list) A list of category_id entries that this current category encompasses.final Category.BuilderRequired - A regular expression that is used to search for values that match the category.final Category.BuilderresultType(String value) Required - API name:result_typeprotected Category.Builderself()final Category.BuilderRequired - A space separated list of the common tokens that are matched in values of the category.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
categoryId
Required - A unique identifier for the category. category_id is unique at the job level, even when per-partition categorization is enabled.API name:
category_id -
examples
Required - A list of examples of actual values that matched the category.API name:
examplesAdds all elements of
listtoexamples. -
examples
Required - A list of examples of actual values that matched the category.API name:
examplesAdds one or more values to
examples. -
grokPattern
[experimental] A Grok pattern that could be used in Logstash or an ingest pipeline to extract fields from messages that match the category. This field is experimental and may be changed or removed in a future release. The Grok patterns that are found are not optimal, but are often a good starting point for manual tweaking.API name:
grok_pattern -
jobId
Required - Identifier for the anomaly detection job.API name:
job_id -
maxMatchingLength
Required - The maximum length of the fields that matched the category. The value is increased by 10% to enable matching for similar fields that have not been analyzed.API name:
max_matching_length -
partitionFieldName
If per-partition categorization is enabled, this property identifies the field used to segment the categorization. It is not present when per-partition categorization is disabled.API name:
partition_field_name -
partitionFieldValue
If per-partition categorization is enabled, this property identifies the value of the partition_field_name for the category. It is not present when per-partition categorization is disabled.API name:
partition_field_value -
regex
Required - A regular expression that is used to search for values that match the category.API name:
regex -
terms
Required - A space separated list of the common tokens that are matched in values of the category.API name:
terms -
numMatches
The number of messages that have been matched by this category. This is only guaranteed to have the latest accurate count after a job _flush or _closeAPI name:
num_matches -
preferredToCategories
A list of category_id entries that this current category encompasses. Any new message that is processed by the categorizer will match against this category and not any of the categories in this list. This is only guaranteed to have the latest accurate list of categories after a job _flush or _closeAPI name:
preferred_to_categoriesAdds all elements of
listtopreferredToCategories. -
preferredToCategories
A list of category_id entries that this current category encompasses. Any new message that is processed by the categorizer will match against this category and not any of the categories in this list. This is only guaranteed to have the latest accurate list of categories after a job _flush or _closeAPI name:
preferred_to_categoriesAdds one or more values to
preferredToCategories. -
p
API name:p -
resultType
Required - API name:result_type -
mlcategory
Required - API name:mlcategory -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<Category.Builder>
-
build
Builds aCategory.- Specified by:
buildin interfaceObjectBuilder<Category>- Throws:
NullPointerException- if some of the required fields are null.
-