Class Detector
java.lang.Object
org.elasticsearch.client.ml.job.config.Detector
- All Implemented Interfaces:
ToXContent
,ToXContentObject
public class Detector extends java.lang.Object implements 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
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Field Summary
Fields Modifier and Type Field Description static ParseField
BY_FIELD_NAME_FIELD
static ParseField
CUSTOM_RULES_FIELD
static ParseField
DETECTOR_DESCRIPTION_FIELD
static ParseField
DETECTOR_INDEX
static ParseField
EXCLUDE_FREQUENT_FIELD
static ParseField
FIELD_NAME_FIELD
static ParseField
FUNCTION_FIELD
static ParseField
OVER_FIELD_NAME_FIELD
static ObjectParser<Detector.Builder,java.lang.Void>
PARSER
static ParseField
PARTITION_FIELD_NAME_FIELD
static ParseField
USE_NULL_FIELD
-
Method Summary
Modifier and Type Method Description static Detector.Builder
builder()
boolean
equals(java.lang.Object other)
java.lang.String
getByFieldName()
The 'by' field ornull
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 bothjava.lang.String
getFieldName()
The Analysis fieldDetectorFunction
getFunction()
The analysis function used e.g.java.lang.String
getOverFieldName()
The 'over' field ornull
if not set.java.lang.String
getPartitionFieldName()
Segments the analysis along another field to have completely independent baselines for each instance of partitionfieldjava.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.XContentBuilder
toXContent(XContentBuilder builder, ToXContent.Params params)
-
Field Details
-
Method Details
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
getDetectorDescription
public java.lang.String getDetectorDescription() -
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 ornull
if not set.- Returns:
- The 'by' field
-
getOverFieldName
public java.lang.String getOverFieldName()The 'over' field ornull
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
Excludes frequently-occurring metrics from the analysis; can apply to 'by' field, 'over' field, or both- Returns:
- the value that the user set
-
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 classjava.lang.Object
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
builder
-