On Wed, May 8, 2013, at 02:07 AM, Chris Hostetter wrote:
> 
> : I am about to index identfier fields containing blanks (shelfmarks) eg.
> G
> : 23/60 12
> : The field type is set to Solr.string. To get the exact matching hit
> (the doc
> : with shelfmark mentioned above) the user must quote the search term. Is
> there
> : a way to omit the quotes?
> 
> whitespace has to be quoted when using the lucene QParser because it's a 
> semanticly significant character that means "end boolean query clause"
> 
> if you want to search for a literal string w/o needing any escaping, use 
> the term QParser...
> 
>       {!term f=yourFieldName}G 23/60 12
> 
> Of course, if you are putting this in a URL (ie: testing in a browser) it 
> still needs to be URL escaped...
> 
>       /select?q={!term+f=yourFieldName}G+23/60+12

I'm surprised you didn't offer the improvement (a technique I learned
from you..:-) ):

/select?q={!term f=yourFieldName v=$productCode}&productCode=G 23/60 12

which allows you to present the code as a separate request parameter.

Upayavira

Reply via email to