lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrien Grand <jpou...@gmail.com>
Subject Re: Case Insensitive Search for StringField
Date Wed, 23 May 2018 06:39:31 GMT
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 <chellasamy.g@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
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message