FAQ
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

Search Discussions

  • Danil ŢORIN at Oct 8, 2010 at 10:10 am
    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 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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
categorieslucene
postedOct 8, '10 at 9:56a
activeOct 8, '10 at 10:10a
posts2
users2
websitelucene.apache.org

2 users in discussion

Danil ŢORIN: 1 post Jan Engler: 1 post

People

Translate

site design / logo © 2022 Grokbase