If i update index analyzer like synonyms or keywords, i need to reindex the documents?
I notice some strange search result after analyzer update.
The answer is yes. You need all your data to be indexed in the same way. This could be the reason for getting "strange" results. The data that was already indexed was indexed according to the rules of the previously defined analyzers. Any data you index after changing the analyzers is indexed by the new rules.
And since your query also now gets analyzed by the new rules, it might not produce results from the old indexed data set. You can easily reindex data now through the elastic reindex api. Read: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html If you are concerned about Down-time, then you can read: https://www.elastic.co/blog/changing-mapping-with-zero-downtime
You can create a new index (index_name_v1) with the desired settings that you want. Next you can use the reindex API:
POST /_reindex
{
"source": {
"index": "old_index"
},
"dest": {
"index": "index_name_v1"
}
}
That is correct. Previously indexed data will not reflect the changes as per paragraph 1 here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With