Class DatafeedConfig
- java.lang.Object
-
- org.elasticsearch.client.ml.datafeed.DatafeedConfig
-
- All Implemented Interfaces:
ToXContent
,ToXContentObject
public class DatafeedConfig extends java.lang.Object implements ToXContentObject
The datafeed configuration object. It specifies which indices to get the data from and offers parameters for customizing different aspects of the process.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DatafeedConfig.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 ParseField
AGGREGATIONS
static ParseField
CHUNKING_CONFIG
static ParseField
DELAYED_DATA_CHECK_CONFIG
static ParseField
FREQUENCY
static ParseField
ID
static ParseField
INDEXES
static ParseField
INDICES
static ConstructingObjectParser<DatafeedConfig.Builder,java.lang.Void>
PARSER
static ParseField
QUERY
static ParseField
QUERY_DELAY
static ParseField
SCRIPT_FIELDS
static ParseField
SCROLL_SIZE
static ParseField
TYPES
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Method Summary
Modifier and Type Method Description static DatafeedConfig.Builder
builder(java.lang.String id, java.lang.String jobId)
boolean
equals(java.lang.Object other)
The lists of indices and types are compared for equality but they are not sorted first so this test could fail simply because the indices and types lists are in different orders.BytesReference
getAggregations()
ChunkingConfig
getChunkingConfig()
DelayedDataCheckConfig
getDelayedDataCheckConfig()
TimeValue
getFrequency()
java.lang.String
getId()
java.util.List<java.lang.String>
getIndices()
java.lang.String
getJobId()
BytesReference
getQuery()
TimeValue
getQueryDelay()
java.util.List<SearchSourceBuilder.ScriptField>
getScriptFields()
java.lang.Integer
getScrollSize()
java.util.List<java.lang.String>
getTypes()
int
hashCode()
Note this could be a heavy operation when a query or aggregations are set as we need to convert the bytes references into maps to compute a stable hash code.XContentBuilder
toXContent(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
-
ID
public static final ParseField ID
-
QUERY_DELAY
public static final ParseField QUERY_DELAY
-
FREQUENCY
public static final ParseField FREQUENCY
-
INDEXES
public static final ParseField INDEXES
-
INDICES
public static final ParseField INDICES
-
TYPES
public static final ParseField TYPES
-
QUERY
public static final ParseField QUERY
-
SCROLL_SIZE
public static final ParseField SCROLL_SIZE
-
AGGREGATIONS
public static final ParseField AGGREGATIONS
-
SCRIPT_FIELDS
public static final ParseField SCRIPT_FIELDS
-
CHUNKING_CONFIG
public static final ParseField CHUNKING_CONFIG
-
DELAYED_DATA_CHECK_CONFIG
public static final ParseField DELAYED_DATA_CHECK_CONFIG
-
PARSER
public static final ConstructingObjectParser<DatafeedConfig.Builder,java.lang.Void> PARSER
-
-
Method Detail
-
getId
public java.lang.String getId()
-
getJobId
public java.lang.String getJobId()
-
getQueryDelay
public TimeValue getQueryDelay()
-
getFrequency
public TimeValue getFrequency()
-
getIndices
public java.util.List<java.lang.String> getIndices()
-
getTypes
public java.util.List<java.lang.String> getTypes()
-
getScrollSize
public java.lang.Integer getScrollSize()
-
getQuery
public BytesReference getQuery()
-
getAggregations
public BytesReference getAggregations()
-
getScriptFields
public java.util.List<SearchSourceBuilder.ScriptField> getScriptFields()
-
getChunkingConfig
public ChunkingConfig getChunkingConfig()
-
getDelayedDataCheckConfig
public DelayedDataCheckConfig getDelayedDataCheckConfig()
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object other)
The lists of indices and types are compared for equality but they are not sorted first so this test could fail simply because the indices and types lists are in different orders. Also note this could be a heavy operation when a query or aggregations are set as we need to convert the bytes references into maps to correctly compare them.- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
Note this could be a heavy operation when a query or aggregations are set as we need to convert the bytes references into maps to compute a stable hash code.- Overrides:
hashCode
in classjava.lang.Object
-
builder
public static DatafeedConfig.Builder builder(java.lang.String id, java.lang.String jobId)
-
-