Hi Kai:

Thanks for your reply, for what I've understood this logic must be included in 
my application, It would be possible to, for instance, use some regular 
expression at querying time in my schema to avoid a query that contains only 
this characters? for instance + and +++++ would be a good catch to avoid.

Thanks in advance!

----- Mensaje original -----
De: "Kai Becker" <m...@kai-becker.com>
Para: solr-user@lucene.apache.org
Enviados: Martes, 23 de Abril 2013 9:48:26
Asunto: Re: Querying only for "+" character causes 
org.apache.lucene.queryParser.ParseException

Hi,

you need to escape that char in search terms.
Special chars are + - ! ( ) { } [ ] ^ " ~ * ? : \ / at the moment.

The %2B is just the url encoding, but it will still be a + for Solr, so just 
put a \ in front of the chars I mentioned.

Cheers,
Kai

Am 23.04.2013 um 15:41 schrieb Jorge Luis Betancourt Gonzalez:

> Hi!
> 
> Currently I'm working on a basica search engine for, the main problem is that 
> during some tests a problem was detected, in the application if a user search 
> for the "+" or "-" term only or the "+++++" string it causes an exception in 
> my application, the problem is caused for an 
> org.apache.lucene.queryParser.ParseException in solr. I get the same response 
> if, from the solr admin interface, I search for the + term. For what I've 
> seen the "+" character gets encoded into "%2B" which cause the exception. Is 
> there any way of escaping this character so they behave like any other 
> character? or at least get no response for this cases? 
> 
> I'm using solr 3.6.2, deployed in tomcat7.
> 
> Greetings! 
> http://www.uci.cu

http://www.uci.cu
http://www.uci.cu

Reply via email to