Class AnalysisConfig
- java.lang.Object
-
- org.elasticsearch.client.ml.job.config.AnalysisConfig
-
- All Implemented Interfaces:
ToXContent,ToXContentObject
public class AnalysisConfig extends Object implements ToXContentObject
Analysis configuration options that describe which fields are analyzed and which functions are used to detect anomalies.The configuration can contain multiple detectors, a new anomaly detector will be created for each detector configuration. The fields
bucketSpan, summaryCountFieldName and categorizationFieldNameapply to all detectors.If a value has not been set it will be
nullObject wrappers are used around integral types & booleans so they can takenullvalues.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAnalysisConfig.Builder-
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 ParseFieldANALYSIS_CONFIGSerialisation namesstatic ParseFieldBUCKET_SPANstatic ParseFieldCATEGORIZATION_ANALYZERstatic ParseFieldCATEGORIZATION_FIELD_NAMEstatic ParseFieldCATEGORIZATION_FILTERSstatic ParseFieldDETECTORSstatic ParseFieldINFLUENCERSstatic ParseFieldLATENCYstatic ParseFieldMULTIVARIATE_BY_FIELDSstatic ConstructingObjectParser<AnalysisConfig.Builder,Void>PARSERstatic ParseFieldSUMMARY_COUNT_FIELD_NAME-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AnalysisConfig.Builderbuilder(List<Detector> detectors)List<String>byFields()booleanequals(Object object)List<String>fields()TimeValuegetBucketSpan()The analysis bucket spanCategorizationAnalyzerConfiggetCategorizationAnalyzerConfig()StringgetCategorizationFieldName()List<String>getCategorizationFilters()List<Detector>getDetectors()The list of analysis detectors.List<String>getInfluencers()The list of influence field namesTimeValuegetLatency()The latency interval during which out-of-order records should be handled.BooleangetMultivariateByFields()StringgetSummaryCountFieldName()The name of the field that contains counts for pre-summarised inputinthashCode()List<String>overFields()List<String>partitionFields()XContentBuildertoXContent(XContentBuilder builder, 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 Detail
-
ANALYSIS_CONFIG
public static final ParseField ANALYSIS_CONFIG
Serialisation names
-
BUCKET_SPAN
public static final ParseField BUCKET_SPAN
-
CATEGORIZATION_FIELD_NAME
public static final ParseField CATEGORIZATION_FIELD_NAME
-
CATEGORIZATION_FILTERS
public static final ParseField CATEGORIZATION_FILTERS
-
CATEGORIZATION_ANALYZER
public static final ParseField CATEGORIZATION_ANALYZER
-
LATENCY
public static final ParseField LATENCY
-
SUMMARY_COUNT_FIELD_NAME
public static final ParseField SUMMARY_COUNT_FIELD_NAME
-
DETECTORS
public static final ParseField DETECTORS
-
INFLUENCERS
public static final ParseField INFLUENCERS
-
MULTIVARIATE_BY_FIELDS
public static final ParseField MULTIVARIATE_BY_FIELDS
-
PARSER
public static final ConstructingObjectParser<AnalysisConfig.Builder,Void> PARSER
-
-
Method Detail
-
getBucketSpan
public TimeValue getBucketSpan()
The analysis bucket span- Returns:
- The bucketspan or
nullif not set
-
getCategorizationFieldName
public String getCategorizationFieldName()
-
getCategorizationAnalyzerConfig
public CategorizationAnalyzerConfig getCategorizationAnalyzerConfig()
-
getLatency
public TimeValue getLatency()
The latency interval during which out-of-order records should be handled.- Returns:
- The latency interval or
nullif not set
-
getSummaryCountFieldName
public String getSummaryCountFieldName()
The name of the field that contains counts for pre-summarised input- Returns:
- The field name or
nullif not set
-
getDetectors
public List<Detector> getDetectors()
The list of analysis detectors. In a valid configuration the list should contain at least 1Detector- Returns:
- The Detectors used in this job
-
getMultivariateByFields
public Boolean getMultivariateByFields()
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
- Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
builder
public static AnalysisConfig.Builder builder(List<Detector> detectors)
-
-