Filter queries of values with + sign not decoded correctly
----------------------------------------------------------
Key: SOLR-2456
URL: https://issues.apache.org/jira/browse/SOLR-2456
Project: Solr
Issue Type: Bug
Components: search
Affects Versions: 4.0
Reporter: Scott Kister
Priority: Minor
Querying by filters with values containing a + sign does not work as expected.
Querying by the quoted value fails. Escaping the + and space without quotes
also fails. I did finally get a query to work, but it involved both quoting the
value and escaping the +, but not the space.
Either quoting the value, or escaping should work.
To reproduce, create a test collection with two documents.
"response":{"numFound":2,"start":0,"docs":[{
"listing_id":2483808693,
"required_experience":["10+ Years"]},{
"listing_id":2484835296,
"required_experience":["1 to 2 Years"]}]
These all return 0 results, I believe the first 4 should work.
?fq=required_experience:1+to+2+Years
?fq=required_experience:1%20to%202%20Years
?fq=required_experience:10%2B%20Years
?fq=required_experience:"10+ Years"
?fq=required_experience:10\+\ Years
These do work, the second one should not work since %2B is quoted and should
not then be urldecoded.
?fq=required_experience:"1 to 2 Years"
?fq=required_experience:"10%2B Years"
I tested with the most recent build, apache-solr-4.0-2011-04-01_08-37-23.tgz
schema.xml for required_experience is
<fieldType name="string" class="solr.StrField" sortMissingLast="true"
omitNorms="true"/>
<field name="required_experience" type="string" indexed="true" />
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]