Or you can use MappingCharFilter if you are using Lucene 2.9.
You can convert "c++" into "cplusplus" prior to running Tokenizer.
Koji
--
http://www.rondhuit.com/en/
Ian Lea wrote:
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 <musicfrea...@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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org