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

Paul Elschot commented on LUCENE-6926:
--------------------------------------

The patch uses only matchCost  of req and excl, but it might be better to also 
use their costs as a weight, just like a conjunction. The patch uses equal 
weights for req and excl.

Here the conjunction is (req and (not excl)), and for weighting their costs are 
req.cost() and (N - excl.cost()), with N as the number of docs in the segment.
This would boil down to normally using req first, as expected. Only when excl 
matches a lot of docs, its weighting cost would be lower.

Would it be worthwhile to use such weights here?
See also LUCENE-6894 where the number of docs in a segment is used much more.

> Take matchCost into account for MUST_NOT clauses
> ------------------------------------------------
>
>                 Key: LUCENE-6926
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6926
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-6926.patch
>
>
> ReqExclScorer potentially has two TwoPhaseIterators to check: the one for the 
> positive clause and the one for the negative clause. It should leverage the 
> match cost API to check the least costly one first.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to