You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexander S. (JIRA)" <ji...@apache.org> on 2014/09/09 20:03:29 UTC
[jira] [Commented] (SOLR-6494) Query filters applied in a wrong
order
[ https://issues.apache.org/jira/browse/SOLR-6494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14127304#comment-14127304 ]
Alexander S. commented on SOLR-6494:
------------------------------------
Hi, thank you for the explanation, but I think sometimes (like in this case) it would be much more efficient to run filters one by one. It seems that the cost parameter should do what I need, e.g.:
{code}
{!cost=1}type:"Award::Nomination"
{!cost=10}created_at_d:[* TO 2014-09-08T23:59:59Z]
{code}
> Query filters applied in a wrong order
> --------------------------------------
>
> Key: SOLR-6494
> URL: https://issues.apache.org/jira/browse/SOLR-6494
> 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
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
Re: [jira] [Commented] (SOLR-6494) Query filters applied in a wrong order
Posted by Erick Erickson <er...@gmail.com>.
I don't think so. Note the comment in the URL I sent you:
"When a filter isn’t generated up front and cached, it’s executed in
parallel with the main query."
"Isn't generated up front and cached" means, AFAIK, that you've got to
specify cache=false.....
On Tue, Sep 9, 2014 at 11:03 AM, Alexander S. (JIRA) <ji...@apache.org> wrote:
>
> [ https://issues.apache.org/jira/browse/SOLR-6494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14127304#comment-14127304 ]
>
> Alexander S. commented on SOLR-6494:
> ------------------------------------
>
> Hi, thank you for the explanation, but I think sometimes (like in this case) it would be much more efficient to run filters one by one. It seems that the cost parameter should do what I need, e.g.:
> {code}
> {!cost=1}type:"Award::Nomination"
> {!cost=10}created_at_d:[* TO 2014-09-08T23:59:59Z]
> {code}
>
>> Query filters applied in a wrong order
>> --------------------------------------
>>
>> Key: SOLR-6494
>> URL: https://issues.apache.org/jira/browse/SOLR-6494
>> 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
> (v6.3.4#6332)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org