Class Detector

java.lang.Object
org.elasticsearch.client.ml.job.config.Detector
All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public class Detector
extends java.lang.Object
implements org.elasticsearch.common.xcontent.ToXContentObject
Defines the fields and functions used in the analysis. A combination of field_name, by_field_name and over_field_name can be used depending on the specific function chosen. For more information see configuring detectors and detector functions.
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    static class  Detector.Builder  
    static class  Detector.ExcludeFrequent  

    Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent

    org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields
    Modifier and Type Field Description
    static org.elasticsearch.common.ParseField BY_FIELD_NAME_FIELD  
    static org.elasticsearch.common.ParseField CUSTOM_RULES_FIELD  
    static org.elasticsearch.common.ParseField DETECTOR_DESCRIPTION_FIELD  
    static org.elasticsearch.common.ParseField DETECTOR_INDEX  
    static org.elasticsearch.common.ParseField EXCLUDE_FREQUENT_FIELD  
    static org.elasticsearch.common.ParseField FIELD_NAME_FIELD  
    static org.elasticsearch.common.ParseField FUNCTION_FIELD  
    static org.elasticsearch.common.ParseField OVER_FIELD_NAME_FIELD  
    static org.elasticsearch.common.xcontent.ObjectParser<Detector.Builder,​java.lang.Void> PARSER  
    static org.elasticsearch.common.ParseField PARTITION_FIELD_NAME_FIELD  
    static org.elasticsearch.common.ParseField USE_NULL_FIELD  

    Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Method Summary

    Modifier and Type Method Description
    static Detector.Builder builder()  
    boolean equals​(java.lang.Object other)  
    java.lang.String getByFieldName()
    The 'by' field or null if not set.
    java.lang.String getDetectorDescription()  
    int getDetectorIndex()  
    Detector.ExcludeFrequent getExcludeFrequent()
    Excludes frequently-occurring metrics from the analysis; can apply to 'by' field, 'over' field, or both
    java.lang.String getFieldName()
    The Analysis field
    DetectorFunction getFunction()
    The analysis function used e.g.
    java.lang.String getOverFieldName()
    The 'over' field or null if not set.
    java.lang.String getPartitionFieldName()
    Segments the analysis along another field to have completely independent baselines for each instance of partitionfield
    java.util.List<DetectionRule> getRules()  
    int hashCode()  
    boolean isUseNull()
    Where there isn't a value for the 'by' or 'over' field should a new series be used as the 'null' series.
    org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.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.ToXContentObject

    isFragment
  • Field Details

    • DETECTOR_DESCRIPTION_FIELD

      public static final org.elasticsearch.common.ParseField DETECTOR_DESCRIPTION_FIELD
    • FUNCTION_FIELD

      public static final org.elasticsearch.common.ParseField FUNCTION_FIELD
    • FIELD_NAME_FIELD

      public static final org.elasticsearch.common.ParseField FIELD_NAME_FIELD
    • BY_FIELD_NAME_FIELD

      public static final org.elasticsearch.common.ParseField BY_FIELD_NAME_FIELD
    • OVER_FIELD_NAME_FIELD

      public static final org.elasticsearch.common.ParseField OVER_FIELD_NAME_FIELD
    • PARTITION_FIELD_NAME_FIELD

      public static final org.elasticsearch.common.ParseField PARTITION_FIELD_NAME_FIELD
    • USE_NULL_FIELD

      public static final org.elasticsearch.common.ParseField USE_NULL_FIELD
    • EXCLUDE_FREQUENT_FIELD

      public static final org.elasticsearch.common.ParseField EXCLUDE_FREQUENT_FIELD
    • CUSTOM_RULES_FIELD

      public static final org.elasticsearch.common.ParseField CUSTOM_RULES_FIELD
    • DETECTOR_INDEX

      public static final org.elasticsearch.common.ParseField DETECTOR_INDEX
    • PARSER

      public static final org.elasticsearch.common.xcontent.ObjectParser<Detector.Builder,​java.lang.Void> PARSER
  • Method Details

    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent​(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
      java.io.IOException
    • getDetectorDescription

      public java.lang.String getDetectorDescription()
    • getFunction

      public DetectorFunction getFunction()
      The analysis function used e.g. count, rare, min etc.
      Returns:
      The function or null if not set
    • getFieldName

      public java.lang.String getFieldName()
      The Analysis field
      Returns:
      The field to analyse
    • getByFieldName

      public java.lang.String getByFieldName()
      The 'by' field or null if not set.
      Returns:
      The 'by' field
    • getOverFieldName

      public java.lang.String getOverFieldName()
      The 'over' field or null if not set.
      Returns:
      The 'over' field
    • getPartitionFieldName

      public java.lang.String getPartitionFieldName()
      Segments the analysis along another field to have completely independent baselines for each instance of partitionfield
      Returns:
      The Partition Field
    • isUseNull

      public boolean isUseNull()
      Where there isn't a value for the 'by' or 'over' field should a new series be used as the 'null' series.
      Returns:
      true if the 'null' series should be created
    • getExcludeFrequent

      public Detector.ExcludeFrequent getExcludeFrequent()
      Excludes frequently-occurring metrics from the analysis; can apply to 'by' field, 'over' field, or both
      Returns:
      the value that the user set
    • getRules

      public java.util.List<DetectionRule> getRules()
    • getDetectorIndex

      public int getDetectorIndex()
      Returns:
      the detector index or a negative number if unknown
    • equals

      public boolean equals​(java.lang.Object other)
      Overrides:
      equals in class java.lang.Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • builder

      public static Detector.Builder builder()