lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jack Krupansky <jack.krupan...@gmail.com>
Subject Re: How to use case in-sentive search
Date Fri, 14 Aug 2015 14:12:46 GMT
I was assuming this was a Lucene question...

The StandardAnalyzer already includes the lower case filter, so the default
should be case-insensitive query.

See:
https://lucene.apache.org/core/5_2_1/analyzers-common/org/apache/lucene/analysis/standard/StandardAnalyzer.html

If the question was really how to get case-sensitive query, simply create
your own analyzer without the lower case filter.


-- Jack Krupansky

On Fri, Aug 14, 2015 at 10:07 AM, Erick Erickson <erickerickson@gmail.com>
wrote:

> Add LowercaseFilterFactory to your analysis chain for the fieldType
> both at query and index time. You'll need to re-index.
>
> The admin UI/analysis page will help you understand the effects
> of each analysis step defined in your fieldTypes.
>
> Best,
> Erick
>
> On Fri, Aug 14, 2015 at 3:44 AM, vardhaman narasagoudar
> <vardhamanbn@gmail.com> wrote:
> > Dear Team,
> >
> > I am trying to build a search engine for fetching person info based on
> name
> > or  email Id. For this I have standard Analyzer & wildcard. If I enter
> case
> > senstive query I get the result. but how to go about for case in-senstive
> >
> > I mean if I search for rohan or Rohan should be same, Currently I  search
> > as per DB that is Rohan , I get the result & not for rohan.
> >
> > I have posted the same query in Stack overflow
> >
> http://stackoverflow.com/questions/30881355/java-lucene-4-5-how-to-search-by-case-insensitive/30926385#30926385
> >
> > Please help me out, is there any refernce where I can look in
> >
> > --
> > Thanks & Regards
> > Vardhaman B.N
> > 9945840928
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

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