Class DatafeedConfig
java.lang.Object
org.elasticsearch.client.ml.datafeed.DatafeedConfig
- All Implemented Interfaces:
org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
public class DatafeedConfig
extends java.lang.Object
implements org.elasticsearch.common.xcontent.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 classDatafeedConfig.BuilderNested 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.ParseFieldAGGREGATIONSstatic org.elasticsearch.common.ParseFieldCHUNKING_CONFIGstatic org.elasticsearch.common.ParseFieldDELAYED_DATA_CHECK_CONFIGstatic org.elasticsearch.common.ParseFieldFREQUENCYstatic org.elasticsearch.common.ParseFieldIDstatic org.elasticsearch.common.ParseFieldINDEXESstatic org.elasticsearch.common.ParseFieldINDICESstatic org.elasticsearch.common.ParseFieldINDICES_OPTIONSstatic org.elasticsearch.common.ParseFieldMAX_EMPTY_SEARCHESstatic org.elasticsearch.common.xcontent.ConstructingObjectParser<DatafeedConfig.Builder,java.lang.Void>PARSERstatic org.elasticsearch.common.ParseFieldQUERYstatic org.elasticsearch.common.ParseFieldQUERY_DELAYstatic org.elasticsearch.common.ParseFieldSCRIPT_FIELDSstatic org.elasticsearch.common.ParseFieldSCROLL_SIZEFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Method Summary
Modifier and Type Method Description static DatafeedConfig.Builderbuilder(java.lang.String id, java.lang.String jobId)booleanequals(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.org.elasticsearch.common.bytes.BytesReferencegetAggregations()ChunkingConfiggetChunkingConfig()DelayedDataCheckConfiggetDelayedDataCheckConfig()org.elasticsearch.common.unit.TimeValuegetFrequency()java.lang.StringgetId()java.util.List<java.lang.String>getIndices()org.elasticsearch.action.support.IndicesOptionsgetIndicesOptions()java.lang.StringgetJobId()java.lang.IntegergetMaxEmptySearches()org.elasticsearch.common.bytes.BytesReferencegetQuery()org.elasticsearch.common.unit.TimeValuegetQueryDelay()java.util.Map<java.lang.String,java.lang.Object>getRuntimeMappings()java.util.List<org.elasticsearch.search.builder.SearchSourceBuilder.ScriptField>getScriptFields()java.lang.IntegergetScrollSize()inthashCode()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.org.elasticsearch.common.xcontent.XContentBuildertoXContent(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, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Field Details
-
ID
public static final org.elasticsearch.common.ParseField ID -
QUERY_DELAY
public static final org.elasticsearch.common.ParseField QUERY_DELAY -
FREQUENCY
public static final org.elasticsearch.common.ParseField FREQUENCY -
INDEXES
public static final org.elasticsearch.common.ParseField INDEXES -
INDICES
public static final org.elasticsearch.common.ParseField INDICES -
QUERY
public static final org.elasticsearch.common.ParseField QUERY -
SCROLL_SIZE
public static final org.elasticsearch.common.ParseField SCROLL_SIZE -
AGGREGATIONS
public static final org.elasticsearch.common.ParseField AGGREGATIONS -
SCRIPT_FIELDS
public static final org.elasticsearch.common.ParseField SCRIPT_FIELDS -
CHUNKING_CONFIG
public static final org.elasticsearch.common.ParseField CHUNKING_CONFIG -
DELAYED_DATA_CHECK_CONFIG
public static final org.elasticsearch.common.ParseField DELAYED_DATA_CHECK_CONFIG -
MAX_EMPTY_SEARCHES
public static final org.elasticsearch.common.ParseField MAX_EMPTY_SEARCHES -
INDICES_OPTIONS
public static final org.elasticsearch.common.ParseField INDICES_OPTIONS -
PARSER
public static final org.elasticsearch.common.xcontent.ConstructingObjectParser<DatafeedConfig.Builder,java.lang.Void> PARSER
-
-
Method Details
-
getId
public java.lang.String getId() -
getJobId
public java.lang.String getJobId() -
getQueryDelay
public org.elasticsearch.common.unit.TimeValue getQueryDelay() -
getFrequency
public org.elasticsearch.common.unit.TimeValue getFrequency() -
getIndices
public java.util.List<java.lang.String> getIndices() -
getScrollSize
public java.lang.Integer getScrollSize() -
getQuery
public org.elasticsearch.common.bytes.BytesReference getQuery() -
getAggregations
public org.elasticsearch.common.bytes.BytesReference getAggregations() -
getScriptFields
public java.util.List<org.elasticsearch.search.builder.SearchSourceBuilder.ScriptField> getScriptFields() -
getChunkingConfig
-
getDelayedDataCheckConfig
-
getMaxEmptySearches
public java.lang.Integer getMaxEmptySearches() -
getIndicesOptions
public org.elasticsearch.action.support.IndicesOptions getIndicesOptions() -
getRuntimeMappings
public java.util.Map<java.lang.String,java.lang.Object> getRuntimeMappings() -
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:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- 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:
equalsin 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:
hashCodein classjava.lang.Object
-
builder
-