homeassistant-elasticsearch
homeassistant-elasticsearch copied to clipboard
Strict dynamic mapping is going to cause issues
trafficstars
Our use of strict dynamic mappings instead of false means that extra fields cause document rejection instead of just ignoring the non-matching fields.
This means we cannot add fields to documents as updating the index template doesnt take effect until the datastream performs rollover.
We need to either:
- Quickly update 0.7.0 with dynamic mappings set to false and provide instructions on how to manually rollover indices
- Check if the current index_template has dynamic mappings set to true and perform a one-off update of the dynamic setting for the current write indices of all open datastreams via
PUT /my-data-stream/_mapping?write_index_only=truewith the new value for the dynamic setting
Included option 2 in https://github.com/legrego/homeassistant-elasticsearch/pull/290
Included option 2 in #290
I'm good with this approach, thanks.