> I am working with apache-solr-3.6.0 on windows machine. I
> would like to
> search for phrases which contain punctuation marks.
> Example:
> 
> "He said: Hi"
> I tried to escape the punctuation marks using \ so my url
> was:
> 
> http://localhost:8983/solr/select/?q="He%20said\:%20Hi"&version=2.2&start=0&rows=10&indent=on&debugQuery=true
> But I discovered that solr trim the punctuation in the
> parsed query and the
> result was:
> 
> <str name="rawquerystring">"He said\: Hi"</str>
> <str name="querystring">"He said\: Hi"</str>
> <str name="parsedquery">PhraseQuery(text:"he said
> hi")</str>
> <str name="parsedquery_toString">text:"he said
> hi"</str>
> So How could I query a phrase without trimming the
> punctuation marks?

fieldType of text is doing this. You need a fieldType (analyzer) that does not 
strip punctuations. For example text_ws 

Reply via email to