Module org.elasticsearch.xcore
Class AnalysisConfig
java.lang.Object
org.elasticsearch.xpack.core.ml.job.config.AnalysisConfig
- All Implemented Interfaces:
Writeable,org.elasticsearch.xcontent.ToXContent,org.elasticsearch.xcontent.ToXContentObject
public class AnalysisConfig
extends Object
implements org.elasticsearch.xcontent.ToXContentObject, Writeable
Autodetect analysis configuration options describes which fields are
analysed and the functions to use.
The configuration can contain multiple detectors, a new anomaly detector will
be created for each detector configuration. The fields
bucketSpan, modelPruneWindow, summaryCountFieldName and categorizationFieldName
apply to all detectors.
If a value has not been set it will be null
Object wrappers are used around integral types & booleans so they can take
null values.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
org.elasticsearch.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.xcontent.ToXContent.MapParams, org.elasticsearch.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.elasticsearch.xcontent.ParseFieldSerialisation namesstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.core.TimeValuestatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ConstructingObjectParser<AnalysisConfig.Builder, Void> static final intstatic final longstatic final Stringstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ParseFieldstatic final org.elasticsearch.xcontent.ConstructingObjectParser<AnalysisConfig.Builder, Void> static final org.elasticsearch.xcontent.ParseFieldFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn the set of fields required by the analysis.byFields()booleanfields()org.elasticsearch.core.TimeValueThe analysis bucket spanThe list of analysis detectors.The list of influence field namesorg.elasticsearch.core.TimeValueThe latency interval during which out-of-order records should be handled.org.elasticsearch.core.TimeValueThe name of the field that contains counts for pre-summarised inputinthashCode()Return the list of term fields.org.elasticsearch.xcontent.XContentBuildertoXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) voidwriteTo(StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
ANALYSIS_CONFIG
public static final org.elasticsearch.xcontent.ParseField ANALYSIS_CONFIGSerialisation names -
BUCKET_SPAN
public static final org.elasticsearch.xcontent.ParseField BUCKET_SPAN -
MODEL_PRUNE_WINDOW
public static final org.elasticsearch.xcontent.ParseField MODEL_PRUNE_WINDOW -
CATEGORIZATION_FIELD_NAME
public static final org.elasticsearch.xcontent.ParseField CATEGORIZATION_FIELD_NAME -
CATEGORIZATION_FILTERS
public static final org.elasticsearch.xcontent.ParseField CATEGORIZATION_FILTERS -
CATEGORIZATION_ANALYZER
public static final org.elasticsearch.xcontent.ParseField CATEGORIZATION_ANALYZER -
PER_PARTITION_CATEGORIZATION
public static final org.elasticsearch.xcontent.ParseField PER_PARTITION_CATEGORIZATION -
LATENCY
public static final org.elasticsearch.xcontent.ParseField LATENCY -
SUMMARY_COUNT_FIELD_NAME
public static final org.elasticsearch.xcontent.ParseField SUMMARY_COUNT_FIELD_NAME -
DETECTORS
public static final org.elasticsearch.xcontent.ParseField DETECTORS -
INFLUENCERS
public static final org.elasticsearch.xcontent.ParseField INFLUENCERS -
MULTIVARIATE_BY_FIELDS
public static final org.elasticsearch.xcontent.ParseField MULTIVARIATE_BY_FIELDS -
ML_CATEGORY_FIELD
- See Also:
-
AUTO_CREATED_FIELDS
-
MAX_CATEGORIZATION_FIELD_LENGTH
public static final int MAX_CATEGORIZATION_FIELD_LENGTH- See Also:
-
LENIENT_PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<AnalysisConfig.Builder,Void> LENIENT_PARSER -
STRICT_PARSER
public static final org.elasticsearch.xcontent.ConstructingObjectParser<AnalysisConfig.Builder,Void> STRICT_PARSER -
MINIMUM_MODEL_PRUNE_WINDOW_BUCKETS
public static final long MINIMUM_MODEL_PRUNE_WINDOW_BUCKETS- See Also:
-
DEFAULT_MODEL_PRUNE_WINDOW
public static final org.elasticsearch.core.TimeValue DEFAULT_MODEL_PRUNE_WINDOW
-
-
Constructor Details
-
AnalysisConfig
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
getBucketSpan
public org.elasticsearch.core.TimeValue getBucketSpan()The analysis bucket span- Returns:
- The bucketspan or
nullif not set
-
getCategorizationFieldName
-
getCategorizationFilters
-
getCategorizationAnalyzerConfig
-
getPerPartitionCategorizationConfig
-
getLatency
public org.elasticsearch.core.TimeValue getLatency()The latency interval during which out-of-order records should be handled.- Returns:
- The latency interval or
nullif not set
-
getSummaryCountFieldName
The name of the field that contains counts for pre-summarised input- Returns:
- The field name or
nullif not set
-
getDetectors
The list of analysis detectors. In a valid configuration the list should contain at least 1Detector- Returns:
- The Detectors used in this job
-
getInfluencers
The list of influence field names -
termFields
Return the list of term fields. These are the influencer fields, partition field, by field and over field of each detector.nulland empty strings are filtered from the config.- Returns:
- Set of term fields - never
null
-
extractReferencedFilters
-
getMultivariateByFields
-
getModelPruneWindow
public org.elasticsearch.core.TimeValue getModelPruneWindow() -
analysisFields
Return the set of fields required by the analysis. These are the influencer fields, metric field, partition field, by field and over field of each detector, plus the summary count field and the categorization field name of the job.nulland empty strings are filtered from the config.- Returns:
- Set of required analysis fields - never
null
-
fields
-
byFields
-
overFields
-
partitionFields
-
toXContent
public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.elasticsearch.xcontent.ToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode()
-