Elasticsearch给全部文档添加新的字段
- 大致有三种解决方法
- scan and scroll all documents
- _update_by_query api
- re-index and add new fields, use the /_reindex API
- 首先要设置允许script运行,修改elasticsearch.yml
script.engine.groovy.inline.aggs: on
script.engine.groovy.inline.search: on
script.engine.groovy.inline.update: on
相关文章