You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by geeky2 <ge...@hotmail.com> on 2013/03/12 23:06:37 UTC
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.
Re: having trouble escaping a character string
Posted by geeky2 <ge...@hotmail.com>.
attempting to upload the screenshot bmp file. the embedded image is
difficult to make out.
temp1.bmp <http://lucene.472066.n3.nabble.com/file/n4046798/temp1.bmp>
--
View this message in context: http://lucene.472066.n3.nabble.com/having-trouble-escaping-a-character-string-tp4046796p4046798.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: having trouble escaping a character string
Posted by geeky2 <ge...@hotmail.com>.
oh -
now i see what i was doing wrong.
i kept trying to use the hex code of %22 as a replacement for the double
quote - but that was not working -
thank you jack,
mark
--
View this message in context: http://lucene.472066.n3.nabble.com/having-trouble-escaping-a-character-string-tp4046796p4046821.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: having trouble escaping a character string
Posted by Jack Krupansky <ja...@basetechnology.com>.
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.