lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-6889) BooleanQuery.rewrite could easily optimize some simple cases
Date Thu, 03 Dec 2015 15:45:11 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-6889?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15037956#comment-15037956
] 

ASF subversion and git services commented on LUCENE-6889:
---------------------------------------------------------

Commit 1717782 from [~jpountz] in branch 'dev/branches/branch_5x'
[ https://svn.apache.org/r1717782 ]

LUCENE-6889: Add some basic rewrite rules to BooleanQuery that can make it run significantly
faster in some cases.

> BooleanQuery.rewrite could easily optimize some simple cases
> ------------------------------------------------------------
>
>                 Key: LUCENE-6889
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6889
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-6889.patch, LUCENE-6889.patch
>
>
> Follow-up of SOLR-8251: APIs and user interfaces sometimes encourage to write BooleanQuery
instances that are not optimal, for instance a typical case that happens often with Solr/Elasticsearch
is to send a request that has a MatchAllDocsQuery as a query and some filter, which could
be executed more efficiently by directly wrapping the filter into a ConstantScoreQuery.
> Here are some ideas of rewrite operations that BooleanQuery could perform:
>  - remove FILTER clauses when they are also a MUST clause
>  - rewrite queries of the form "+*:* #filter" to a ConstantScoreQuery(filter)
>  - rewrite to a MatchNoDocsQuery when a clause that is a MUST or FILTER clause is also
a MUST_NOT clause



--
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


Mime
View raw message