Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export interface Datafeed {
script_fields?: object;
scroll_size?: number;
delayed_data_check_config?: object;
indices_options?: IndicesOptions;
}

export interface ChunkingConfig {
Expand All @@ -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;
}
15 changes: 14 additions & 1 deletion x-pack/plugins/ml/server/routes/schemas/datafeeds_schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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())),
Expand All @@ -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()),
})
),
});