I have already designed an application which is using term queries on keywords and I found out search is case sensitive. The problem is that my keyword fields represent the data as well. That means, I want to search them with non-case sensitive search, from the other hand I do not want to explicitly set them as lowercase as I do not want to loose case information to display data properly.
Is the above possible to achieve with ES 5.1? If not, what is better from performance perspective: duplicate my keywords: one in lowercase for search and another in original case to display? Or switch to "match" query? Actually match query for searching, for instance "777" will return also "111777111" (in filter context), but I want to avoid that.
Thank you for reply, I have updated my ES to 5.2 and used normalizer, which is really easy to configure. Still I do not see any solution to make case-sensitive and non case-sensitive search on the same field (if you setup a normalizer with lowercase filter, you can not search this field without normalizer anymore), but I currently do not need to implement this scenario, probably in later versions we will see normalizers being dynamically added inside the search query
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.