lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson (JIRA)" <>
Subject [jira] [Resolved] (SOLR-6494) Query filters applied in a wrong order
Date Tue, 09 Sep 2014 17:38:29 GMT


Erick Erickson resolved SOLR-6494.
    Resolution: Invalid

First, please raise issues like this on the user's list first to insure that it's really a
bug before raising JIRAs.

Second, I don't think you understand how filter queries work. By design, fq clauses like this
are calculated for the entire document set and the results cached, there is no "ordering"
for that part. Otherwise, how could they be re-used for a different query?

You can get around this by specifying "non-cached" filters, or just pay the price the first
time and be able to re-use the cache later, perhaps with warming queries creating the filter
(assuming it's a common one) to hide the pain of first-time use.


> Query filters applied in a wrong order
> --------------------------------------
>                 Key: SOLR-6494
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.8.1
>            Reporter: Alexander S.
> This query:
> {code}
> {
>   fq: ["type:Award::Nomination"],
>   sort: "score desc",
>   start: 0,
>   rows: 20,
>   q: "*:*"
> }
> {code}
> takes just a few milliseconds, but this one:
> {code}
> {
>   fq: [
>     "type:Award::Nomination",
>     "created_at_d:[* TO 2014-09-08T23:59:59Z]"
>   ],
>   sort: "score desc",
>   start: 0,
>   rows: 20,
>   q: "*:*"
> }
> {code}
> takes almost 15 seconds.
> I have just ≈12k of documents with type "Award::Nomination", but around half a billion
with created_at_d field set. And it seems Solr applies the created_at_d filter first going
through all documents where this field is set, which is not very smart.
> I think if it can't do anything better than applying filters in the alphabet order it
should apply them in the order they were received.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message