FAQ
Hello,

First off I am using the QueryParser with the standardanalyzer. It
seems that whenever I search for the # symbol, nothing is found. This
wouldn't be a problem but the documents I am searching have C# used
and needing to be searched for.

I have tried escaping the # symbol but when I do escape it I just
get the following after calling parse from queryparser using "C#":
Text:c

This is the same as searching just C. Now I know that the toString
can't be relied upon for special characters (C++ escaped correctly is
shown as Text:c), but I know c++ works since it only returns those
hits involved with c++ and not just the letter c (like c# is)

Any help would be appreciated!

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

Search Discussions

  • Ian Lea at Jul 8, 2011 at 11:32 am
    Searching for special characters can be a pain. There is a message
    thread from this list called "Lucene Analyzer that can handle C++ vs
    C#" that might help.


    --
    Ian.

    On Wed, Jul 6, 2011 at 4:19 PM, Aradon Strider wrote:
    Hello,

    First off I am using the QueryParser with the standardanalyzer.  It
    seems that whenever I search for the # symbol, nothing is found.  This
    wouldn't be a problem but the documents I am searching have C# used
    and needing to be searched for.

    I have tried escaping the # symbol but when I do escape it I just
    get the following after calling parse from queryparser using "C#":
    Text:c

    This is the same as searching just C.  Now I know that the toString
    can't be relied upon for special characters (C++ escaped correctly is
    shown as Text:c), but I know c++ works since it only returns those
    hits involved with c++ and not just the letter c (like c# is)

    Any help would be appreciated!

    ---------------------------------------------------------------------
    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
postedJul 6, '11 at 3:25p
activeJul 8, '11 at 11:32a
posts2
users2
websitelucene.apache.org

2 users in discussion

Aradon Strider: 1 post Ian Lea: 1 post

People

Translate

site design / logo © 2022 Grokbase