What have you done to try to track this down? What
proof do you have that the intersection of all those
sets is indeed empty? Have you tried the fq clauses
one at a time? If my guess is correct, you'll see the
last two returning all documents.

This certainly isn't the way fq's work,
and if it were fundamental to fq's, lots of tests would break
and you'd be seeing a zillion bug reports.

So I suspect it's
1> something here you're not showing us
or
2> something really strange with frange
or
3> you are misunderstanding something. To whit:

fq={!frange l=0 u=0}termfreq(body,"crib bedding")&

will return all documents that do _not_ mention "crib bedding"
(since you're specifying term frequency of 0)
as a single term. Which, if the field is analyzed means
all documents since there is no _single_ term "crib bedding",
there are two single terms "crib" and "bedding" perhaps.

BTW, returning 25,000 rows is something of an anti-pattern
in Solr, usually you do that with the export handler.

If that's not what's happening, let's see:
1> results of adding &debug=all to the query
2> what version of Solr?
3> any changes you've made to your solrconfig that might be important.

Best,
Erick

On Thu, Jul 2, 2015 at 11:46 AM, Aki Balogh <a...@marketmuse.com> wrote:
> I'm trying to specify multiple fq and get the intersection: (lines
> separated for readability)
>
> query?
> q=webCrawlId:36&
> fq=(body:"crib bedding" OR title:"crib bedding")&
> fq={!frange l=0 u=0}termfreq(body,"crib bedding")&
> fq={!frange l=0 u=0}termfreq(title,"crib bedding")&
> rows=25000&
> tv=false&
> start=0&
> wt=json
>
> this should return 0 records, but it comes back with results. turns out, it
> is returning records that match ANY of the fqs, not ALL of the fqs.
>
> how can I force solr to return only records that match ALL?
>
> thanks,
> Aki

Reply via email to