Elasticsearch - Index Management
You want to reindex data from logs_2023 to logs_archive but only include documents where level is "error" and add a new field archived set to true. Which reindex request achieves this?
You want to reindex data from logs_2023 to logs_archive but only include documents where level is "error" and add a new field archived set to true. Which reindex request achieves this?
query with term filter must be inside the source object to select only error level logs.script sets ctx._source.archived = true to add the new field during reindex.query inside source with term filter for level: "error" and script setting ctx._source.archived = true is correct. Placing query at top level is invalid. Using match instead of term or setting archived to false is incorrect.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions