[ML] Adding indices_options to datafeed (#59119)
* [ML] Adding indices_options to datafeed * adding extra checks to the schema * updating expand_wildcards
This commit is contained in:
parent
e5362d36a3
commit
4ef594c208
|
@ -25,6 +25,7 @@ export interface Datafeed {
|
|||
script_fields?: object;
|
||||
scroll_size?: number;
|
||||
delayed_data_check_config?: object;
|
||||
indices_options?: IndicesOptions;
|
||||
}
|
||||
|
||||
export interface ChunkingConfig {
|
||||
|
@ -42,3 +43,10 @@ interface Aggregation {
|
|||
aggs?: { [key: string]: any };
|
||||
};
|
||||
}
|
||||
|
||||
interface IndicesOptions {
|
||||
expand_wildcards?: 'all' | 'open' | 'closed' | 'hidden' | 'none';
|
||||
ignore_unavailable?: boolean;
|
||||
allow_no_indices?: boolean;
|
||||
ignore_throttled?: boolean;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,12 @@ export const datafeedConfigSchema = schema.object({
|
|||
feed_id: schema.maybe(schema.string()),
|
||||
aggregations: schema.maybe(schema.any()),
|
||||
aggs: schema.maybe(schema.any()),
|
||||
chunking_config: schema.maybe(schema.any()),
|
||||
chunking_config: schema.maybe(
|
||||
schema.object({
|
||||
mode: schema.maybe(schema.string()),
|
||||
time_span: schema.maybe(schema.string()),
|
||||
})
|
||||
),
|
||||
frequency: schema.maybe(schema.string()),
|
||||
indices: schema.arrayOf(schema.string()),
|
||||
indexes: schema.maybe(schema.arrayOf(schema.string())),
|
||||
|
@ -28,4 +33,12 @@ export const datafeedConfigSchema = schema.object({
|
|||
script_fields: schema.maybe(schema.any()),
|
||||
scroll_size: schema.maybe(schema.number()),
|
||||
delayed_data_check_config: schema.maybe(schema.any()),
|
||||
indices_options: schema.maybe(
|
||||
schema.object({
|
||||
expand_wildcards: schema.maybe(schema.arrayOf(schema.string())),
|
||||
ignore_unavailable: schema.maybe(schema.boolean()),
|
||||
allow_no_indices: schema.maybe(schema.boolean()),
|
||||
ignore_throttled: schema.maybe(schema.boolean()),
|
||||
})
|
||||
),
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue