luoj-roger / solrpy

Automatically exported from code.google.com/p/solrpy
0 stars 0 forks source link

Support queries for phrases #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I have a query where I want to limit the result based on the value of a 
solr.StrField. This is not tokenized and the value can contain spaces, like 
"Region A". I can query this if the phrase is quoted with double quotes, but it 
failes if the double quotes are urlencoded.

A working url is:

 fq=%2Bregion%3A"Region+A"

If I call 

raw_query(..., fq=['+region:"Region A"'])

SearchHandler.raw() urlencodes all parameters passed in and queries with:

 fq=%2Bregion%3A%22Region+A%22

which does not match anymore.

Thread on the mailinglist:
http://groups.google.com/group/solrpy/browse_frm/thread/8c38110e8560361b

Original issue reported on code.google.com by sen...@rehfisch.de on 2 Apr 2011 at 8:13

GoogleCodeExporter commented 9 years ago
Surely this has to be a bug with solr, not solrpy: The urlencoded form should 
be functionally equivalent to that without urlencoding.

Original comment by joel.nothman@gmail.com on 28 Oct 2012 at 5:51