Class DatafeedConfig

java.lang.Object
org.elasticsearch.client.ml.datafeed.DatafeedConfig
All Implemented Interfaces:
org.elasticsearch.xcontent.ToXContent, org.elasticsearch.xcontent.ToXContentObject

public class DatafeedConfig extends Object implements org.elasticsearch.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.
  • Field Details

    • ID

      public static final org.elasticsearch.xcontent.ParseField ID
    • JOB_ID

      public static final org.elasticsearch.xcontent.ParseField JOB_ID
    • QUERY_DELAY

      public static final org.elasticsearch.xcontent.ParseField QUERY_DELAY
    • FREQUENCY

      public static final org.elasticsearch.xcontent.ParseField FREQUENCY
    • INDEXES

      public static final org.elasticsearch.xcontent.ParseField INDEXES
    • INDICES

      public static final org.elasticsearch.xcontent.ParseField INDICES
    • QUERY

      public static final org.elasticsearch.xcontent.ParseField QUERY
    • SCROLL_SIZE

      public static final org.elasticsearch.xcontent.ParseField SCROLL_SIZE
    • AGGREGATIONS

      public static final org.elasticsearch.xcontent.ParseField AGGREGATIONS
    • SCRIPT_FIELDS

      public static final org.elasticsearch.xcontent.ParseField SCRIPT_FIELDS
    • CHUNKING_CONFIG

      public static final org.elasticsearch.xcontent.ParseField CHUNKING_CONFIG
    • DELAYED_DATA_CHECK_CONFIG

      public static final org.elasticsearch.xcontent.ParseField DELAYED_DATA_CHECK_CONFIG
    • MAX_EMPTY_SEARCHES

      public static final org.elasticsearch.xcontent.ParseField MAX_EMPTY_SEARCHES
    • INDICES_OPTIONS

      public static final org.elasticsearch.xcontent.ParseField INDICES_OPTIONS
    • PARSER

      public static final org.elasticsearch.xcontent.ConstructingObjectParser<DatafeedConfig.Builder,Void> PARSER
  • Method Details

    • getId

      public String getId()
    • getJobId

      public String getJobId()
    • getQueryDelay

      public org.elasticsearch.core.TimeValue getQueryDelay()
    • getFrequency

      public org.elasticsearch.core.TimeValue getFrequency()
    • getIndices

      public List<String> getIndices()
    • getScrollSize

      public Integer getScrollSize()
    • getQuery

      public org.elasticsearch.common.bytes.BytesReference getQuery()
    • getAggregations

      public org.elasticsearch.common.bytes.BytesReference getAggregations()
    • getScriptFields

      public List<org.elasticsearch.search.builder.SearchSourceBuilder.ScriptField> getScriptFields()
    • getChunkingConfig

      public ChunkingConfig getChunkingConfig()
    • getDelayedDataCheckConfig

      public DelayedDataCheckConfig getDelayedDataCheckConfig()
    • getMaxEmptySearches

      public Integer getMaxEmptySearches()
    • getIndicesOptions

      public org.elasticsearch.action.support.IndicesOptions getIndicesOptions()
    • getRuntimeMappings

      public Map<String,Object> getRuntimeMappings()
    • toXContent

      public org.elasticsearch.xcontent.XContentBuilder toXContent(org.elasticsearch.xcontent.XContentBuilder builder, org.elasticsearch.xcontent.ToXContent.Params params) throws IOException
      Specified by:
      toXContent in interface org.elasticsearch.xcontent.ToXContent
      Throws:
      IOException
    • equals

      public boolean equals(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 class 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 class Object
    • builder

      public static DatafeedConfig.Builder builder(String id, String jobId)