I have an active ES index and would like to make searches on it case-insensitive. The indexes are being created dynamically and are actively used. The fields are of "keyword" type. I saw that normalizer is the way to lowercase the search tokens on the index. But I'm unable to close, add normalizer, open the index like for adding an analyzer. Is there a better way to add case-insensitive search to an active cluster?
You need to close and open the index in order to change a normalizer/analyzer on an active index.
The lowercasing in your case needs to be applied to all the documents in your index so you also need to reindex your data. The current data that is indexed is not lowercased so changing the normalizer will not change the values that are already indexed.
@gansvv sorry I read your issue too quickly. I though that you were adding a new normalizer to add a new field. You cannot change the normalizer/analyzer that is set in an existing field even if you close the index.
You can only change the search_analyzer but not the analyzer/normalizer that is already set.
You'll need to reindex your data in a new index with the correct mapping upfront. For that you can use _reindex: https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.