lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Danil ŢORIN <torin...@gmail.com>
Subject Re: Case insensitive search
Date Fri, 08 Oct 2010 10:09:32 GMT
I think that StandardAnalyzer will do exactly that thing.
When you specify your field as STORED, the exact copy of the field is
stored so you can retrieve it later.

Analyzer job is just to extract tokens (the things that you'll search
for) and that's where you can play with lower case/stemming/stop words
and so on.

Just try it..and see how it goes

On Fri, Oct 8, 2010 at 12:56, Jan Engler <engler@collide.info> wrote:
> Hi everybody,
>
> I am currently working on a system which stores objects in a database.
> For searching these objects I use a lucene indexer which adds all
> metadata of these objects as fields to a lucene document. Those metadata
> are for instance title, author, etc. I am storing the fields inside
> lucene as they are, like: author:Jan, title: Question to the Lucene
> mailinglist.
> What I want to do now is case-insensitive searching, so that the above
> example will match a query like author:jan or author:jAn. I want to
> return the Fields as the search result without touching the DB. That's
> why I do not store the results in lowercase.
> Is there any possibility to leave the index as it is (mixed lowercase
> and uppercase) but allow the search to be case-insensitive?
>
> I am using the Lucene 3.0.2 and (for now) the StandardAnalyzer...
>
> Thanks for your help and best wishes from Germany,
>
>  Jan
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message