You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Chris Salem <ch...@mainsequence.net> on 2009/07/15 18:19:37 UTC

searching for c++, c#, etc...

Hello,
I'm trying to search for the terms like c++ but the parser is stripping off the ++.  I tried escaping the ++ with slashes but it's still stripping it off.  I could replace + with "plus", is that the best way to do it?  How come escaping isn't working?
thanks
Sincerely,
Chris Salem 

Re: searching for c++, c#, etc...

Posted by Ian Lea <ia...@gmail.com>.
Hi


Escaping should work.  See
http://lucene.apache.org/java/2_4_1/queryparsersyntax.html and
QueryParser.escape().  And you need to be sure that your analyzer
isn't removing the plus signs and that you use the same analyzer for
indexing and searching.

Googling for something like "lucene escape" will find you more info.

Luke will tell you what is actually in your index.


--
Ian.


On Wed, Jul 15, 2009 at 5:19 PM, Chris Salem<ch...@mainsequence.net> wrote:
> Hello,
> I'm trying to search for the terms like c++ but the parser is stripping off the ++.  I tried escaping the ++ with slashes but it's still stripping it off.  I could replace + with "plus", is that the best way to do it?  How come escaping isn't working?
> thanks
> Sincerely,
> Chris Salem
>

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