You need to escape a quote that is used within a quoted string, using backslash

30326R-26" TILLER

becomes

"30326R-26\" TILLER"

becomes

http://bogus/solrpartscat/core2/select?qt=modelItemNoSearch&q=itemModelNoExactMatchStr:%2230326R-26\%22%20TILLER%22

-- Jack Krupansky

-----Original Message----- From: geeky2
Sent: Tuesday, March 12, 2013 6:06 PM
To: solr-user@lucene.apache.org
Subject: having trouble escaping a character string

hello all,

i am searching on this field type:

<field name="itemModelNoExactMatchStr" type="text_exact" indexed="true"
stored="true"/>


   <fieldType name="text_exact" class="solr.TextField"
positionIncrementGap="100">
     <analyzer type="index">
       <tokenizer class="solr.KeywordTokenizerFactory"/>
       <filter class="solr.LowerCaseFilterFactory"/>
       <filter class="solr.TrimFilterFactory"/>
     </analyzer>
     <analyzer type="query">
       <tokenizer class="solr.KeywordTokenizerFactory"/>
       <filter class="solr.LowerCaseFilterFactory"/>
     </analyzer>
   </fieldType>

for this string: 30326R-26" TILLER

when i use the analyzer and issue the query - it indicates success (please
see attached screen shot)

but when i issue the search url - it does not return a document

http://bogus/solrpartscat/core2/select?qt=modelItemNoSearch&q=itemModelNoExactMatchStr:%2230326R-26%22%20TILLER%22

can someone tell me what i am missing?

thx
mark


<http://lucene.472066.n3.nabble.com/file/n4046796/temp1.bmp>







--
View this message in context: http://lucene.472066.n3.nabble.com/having-trouble-escaping-a-character-string-tp4046796.html Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to