For one thing, you wouldn't have fq= in there, except at the beginning.

fq=location:national OR (location:CA AND city:"San Francisco")

more below...

On Tue, Dec 7, 2010 at 10:25 PM, Andy <angelf...@yahoo.com> wrote:
> Forgot to add, my defaultOperator is "AND".
>
> --- On Wed, 12/8/10, Andy <angelf...@yahoo.com> wrote:
>
>> From: Andy <angelf...@yahoo.com>
>> Subject: complex boolean filtering in fq queries
>> To: solr-user@lucene.apache.org
>> Date: Wednesday, December 8, 2010, 1:21 AM
>> I have a facet query that requires
>> some complex boolean filtering. Something like:
>>
>> fq=location:national OR (fq=location:CA AND fq=city:"San
>> Francisco")
>>
>> 1) How do I turn the above filters into a REST query
>> string?

Do you mean URL encoding it? You can just type your query into the
search box in the admin UI, and copy from the resulting URL.

>> 2) Do I need the double quotes around "San Francisco"?

Yes. Else is will be
(city:San) (Francisco)
Probably not what you want.

>> 3) Will complex boolean filters like this substantially
>> slow down query performance?

That's not very complex, and the filter may be cached. Probably won't
be a problem.

Tom

>>
>> Thanks
>>
>>
>>
>>
>
>
>
>

Reply via email to