Hi,
you have to escape lucene special characters present in usersearch term before 
handing it over to QueryParser.
for more info look at 
http://lucene.apache.org/java/2_9_1/queryparsersyntax.html#Escaping%20Special%20Characters



 “ There are only 10 types of people in this world:-
Those who understand binary and those who don’t “ 


Regards, 
P.N.Raju,




________________________________
From: Ranveer Kumar <ranveer.s...@gmail.com>
To: solr-user@lucene.apache.org
Sent: Sun, January 31, 2010 5:35:37 PM
Subject: getting error when ":" in the query

Hi All,

Facing problem when someone searching the string which carry special
character " : ".
For example:

when querying by "ipod:touch" then throwing exception due to " : ".

Jan 31, 2010 9:56:35 PM org.apache.solr.common.SolrException log
SEVERE: org.apache.solr.common.SolrException: undefined field ipod

my full query is :
http://localhost:8080/solr/select?q=ipod:touch&hl=true&start=0&rows=10&hl.fragsize=0&hl.fl=body&hl.snippets=2&wt=xml&version=2.2

is there any configuration to allow ":" in query.
please help.

thanks
with regards
Ranveer K Kumar



      

Reply via email to