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 with a search phrase that is quoted with
double quotes, but it failes if the double quotes are url encoded.
A working url is:
fq=%2Bregion%3A"Region+A"
But SearchHandler.raw() urlencodes all parameters passed in and queries
with:
fq=%2Bregion%3A%22Region+A%22
which does not match. Is there a way do such a query with solrpy?
Thanks,
..Carsten
> it's probably worth entering this into the issue tracker as a bug. I'm
> not sure what the fix is off the top of my head, and it's worth
> tracking.
Thanks for your answer. I added a
<http://code.google.com/p/solrpy/issues/detail?id=26>.
I looked at SearchHandler.raw(). It would be possible if fq (and q) would
also accept lists of 2-tuples that contain (fieldname, value). Then it
could urlencode fieldname and value and quote value afterwards. This should
be backwards compatible too.
I see if I can come up with a patch.
..Carsten
> On Apr 1, 12:19 pm, Carsten Senger <sen...@rehfisch.de> wrote:
>> Hi,
>>
>> 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 with a search phrase that is quoted
>> with double quotes, but it failes if the double quotes are url encoded.
>>
>> A working url is:
>>
>> fq=%2Bregion%3A"Region+A"
>>
>> But SearchHandler.raw() urlencodes all parameters passed in and queries
>> with:
>>
>> fq=%2Bregion%3A%22Region+A%22
>>
>> which does not match. Is there a way do such a query with solrpy?
>>
>> Thanks,
>>
>> ..Carsten
>
> --
> You received this message because you are subscribed to the Google Groups
> "solrpy" group. To post to this group, send email to
> sol...@googlegroups.com.
> To unsubscribe from this group, send email to
> solrpy+un...@googlegroups.com. For more options, visit this group
> at http://groups.google.com/group/solrpy?hl=en.
>