lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian Lea <ian....@gmail.com>
Subject Re: Handling + as a special character in Lucene search
Date Thu, 22 Oct 2009 08:50:03 GMT
You need to make sure that these terms are getting indexed, by using
an analyzer that won't drop them and using Luke to check.  Then, if
you are using QueryParser, you'll need to escape the special
characters e.g. c\+\+.  See
http://lucene.apache.org/java/2_9_0/queryparsersyntax.html#Escaping%20Special%20Characters.
 And use the same analyzer at query time.

Google for something like lucene special characters for more info.


--
Ian.




On Thu, Oct 22, 2009 at 2:40 AM, mitu2009 <musicfreaque@gmail.com> wrote:
>
> Hi,
>
> How do i make sure lucene gives me back relevant search results when my
> input string contains terms like c++? Lucene seems to ignore ++ characters.
>
> Thanks
>
> --
> View this message in context: http://www.nabble.com/Handling-%2B-as-a-special-character-in-Lucene-search-tp26002815p26002815.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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