Hi Team,





Kindly help me out with this problem.





Thanks,

Satyan





---- On Wed, 23 May 2018 15:01:39 +0530 Chellasamy G 
<chellasam...@zohocorp.com> wrote ----




Hi, 

 

 

 

Thanks for the reply. 

 

 

 

Actually I need to implement it for StringField which is non-analyzed. So, if I 
am not wrong I can't add the analyzer for StringField. 

 

 

 

 

 

My scenario is something similar to the one discussed in the below thread, 

 

 

 

https://discuss.elastic.co/t/es-5-0-case-insensitive-search-for-keyword-fields/64111/10
 

 

 

 

Could you please let me know how to do the same the thing in lucene. 

 

 

 

 

 

Thanks, 

 

Satyan 

 

 

 

 

 

 

---- On Wed, 23 May 2018 12:09:31 +0530 Adrien Grand 
<jpou...@gmail.com> wrote ---- 

 

 

 

 

Hi Satyan, 

 

 

 

You need to add a LowercaseTokenFilter to your analysis chain. The way to 

 

do it depends on how you are building your analyzer today (pre-built 

 

analyzer, extending Analyzer or using CustomAnalyzer). This will preserve 

 

the original case in field values because lowercasing will only be applied 

 

to the content of the inverted index, not stored fields where hits are 

 

fetched from. 

 

 

 

Le mer. 23 mai 2018 à 08:36, Chellasamy G 
<chellasam...@zohocorp.com> a 

 

écrit : 

 

 

 

> 

 

> 

 

> Hi, 

 

> 

 

> 

 

> 

 

> I can't find any way to perform case insensitive search on 
StringField. 

 

> Please help me out. 

 

> 

 

> 

 

> 

 

> 

 

> 

 

> i.e If the field value is "Flying Robots", then the phrases "flying 

 

> robots", "fLying RObots" etc should match the value. 

 

> 

 

> 

 

> 

 

> 

 

> 

 

> I also need the original case of the field value to be preserved in 
the 

 

> search results. 

 

> 

 

> 

 

> 

 

> 

 

> 

 

> Thanks, 

 

> 

 

> Satyan 

 

> 

 

> 

 

> 

 

> 

 

 

 

 

 

 






Reply via email to