mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ML] Adds created_by meta data for file data viz import indexes (#27303)
This commit is contained in:
parent
64b2399739
commit
6cc9bc2fc6
2 changed files with 9 additions and 1 deletions
|
@ -6,3 +6,7 @@
|
|||
|
||||
|
||||
export const MAX_BYTES = 104857600;
|
||||
|
||||
// Value to use in the Elasticsearch index mapping meta data to identify the
|
||||
// index as having been created by the ML File Data Visualizer.
|
||||
export const INDEX_META_DATA_CREATED_BY = 'ml_file_data_visualizer';
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
|
||||
import { INDEX_META_DATA_CREATED_BY } from '../../../common/constants/file_datavisualizer';
|
||||
|
||||
export function importDataProvider(callWithRequest) {
|
||||
async function importData(id, index, settings, mappings, ingestPipeline, data) {
|
||||
|
@ -81,8 +82,11 @@ export function importDataProvider(callWithRequest) {
|
|||
const body = {
|
||||
mappings: {
|
||||
_doc: {
|
||||
_meta: {
|
||||
created_by: INDEX_META_DATA_CREATED_BY
|
||||
},
|
||||
properties: mappings
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue