简体   繁体   中英

Is it possible to update `store` value of the mapping of an existing field in ElasticSearch 6.x index?

I have an index created by ElasticSearch 6.8.7. I query against some fields which don't correspond to document's fields, because they are merged copies of document's ones. At index creation their store value was set to false . Now I need to get highlights, but the query fields content is not stored. Can I update mapping and set store to true ? Index's _source is enabled. The docs don't mention this ability, and I can't try to update store on my production cluster.

No, it's not.

In general, the mapping for existing fields cannot be updated. There are some exceptions to this rule. For instance:

  • new properties can be added to Object datatype fields.
  • new multi-fields can be added to existing fields.
  • the ignore_above parameter can be updated.

Source .

Also, I tried to update mapping on a sample index, and ES didn't allow me to update store value of an existing field. That is understandable, but still sad.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM