Class Category

java.lang.Object
co.elastic.clients.elasticsearch.ml.Category
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable
public class Category
extends java.lang.Object
implements JsonpSerializable
See Also:
API specification
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  Category.Builder
    Builder for Category.
  • Field Summary

    Fields
    Modifier and Type Field Description
    static JsonpDeserializer<Category> _DESERIALIZER
    Json deserializer for Category
  • Method Summary

    Modifier and Type Method Description
    java.lang.Number categoryId()
    Required - A unique identifier for the category.
    java.util.List<java.lang.String> examples()
    Required - A list of examples of actual values that matched the category.
    java.lang.String grokPattern()
    [experimental] A Grok pattern that could be used in Logstash or an ingest pipeline to extract fields from messages that match the category.
    java.lang.String jobId()
    Required - Identifier for the anomaly detection job.
    java.lang.Number maxMatchingLength()
    Required - The maximum length of the fields that matched the category.
    java.lang.String mlcategory()
    Required - API name: mlcategory
    java.lang.Long numMatches()
    The number of messages that have been matched by this category.
    static Category of​(java.util.function.Function<Category.Builder,​ObjectBuilder<Category>> fn)  
    java.lang.String p()
    API name: p
    java.lang.String partitionFieldName()
    If per-partition categorization is enabled, this property identifies the field used to segment the categorization.
    java.lang.String partitionFieldValue()
    If per-partition categorization is enabled, this property identifies the value of the partition_field_name for the category.
    java.util.List<java.lang.String> preferredToCategories()
    A list of category_id entries that this current category encompasses.
    java.lang.String regex()
    Required - A regular expression that is used to search for values that match the category.
    java.lang.String resultType()
    Required - API name: result_type
    void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    Serialize this object to JSON.
    protected void serializeInternal​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)  
    protected static void setupCategoryDeserializer​(ObjectDeserializer<Category.Builder> op)  
    java.lang.String terms()
    Required - A space separated list of the common tokens that are matched in values of the category.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Method Details

    • of

      public static Category of​(java.util.function.Function<Category.Builder,​ObjectBuilder<Category>> fn)
    • categoryId

      public final java.lang.Number 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

      public final java.util.List<java.lang.String> examples()
      Required - A list of examples of actual values that matched the category.

      API name: examples

    • grokPattern

      @Nullable public final java.lang.String 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

      public final java.lang.String jobId()
      Required - Identifier for the anomaly detection job.

      API name: job_id

    • maxMatchingLength

      public final java.lang.Number 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

      @Nullable public final java.lang.String 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

      @Nullable public final java.lang.String 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

      public final java.lang.String regex()
      Required - A regular expression that is used to search for values that match the category.

      API name: regex

    • terms

      public final java.lang.String terms()
      Required - A space separated list of the common tokens that are matched in values of the category.

      API name: terms

    • numMatches

      @Nullable public final java.lang.Long 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 _close

      API name: num_matches

    • preferredToCategories

      public final java.util.List<java.lang.String> 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 _close

      API name: preferred_to_categories

    • p

      @Nullable public final java.lang.String p()
      API name: p
    • resultType

      public final java.lang.String resultType()
      Required - API name: result_type
    • mlcategory

      public final java.lang.String mlcategory()
      Required - API name: mlcategory
    • serialize

      public void serialize​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal​(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • setupCategoryDeserializer

      protected static void setupCategoryDeserializer​(ObjectDeserializer<Category.Builder> op)