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

Robert Muir commented on LUCENE-6198:
-------------------------------------

Yeah I explored many similar things because I hate the API i have. 

In the interface case, its very difficult for "wrappers" like 
constantscorequery. It also means we really have to duplicate logic for e.g. 
conjunctions, which really, is no big deal, but it becomes tricky when some 
subs are inexact (say phrases) and others are exact (terms) and needs 
additional wrappers/abstractions to deal with that.

Other options i tried got tricky, the problem is, I think we really want it to 
work for Filters too, so things must be at this very low DocIdSetIterator level 
(versus Scorer, or even DocsEnum where it maybe could be done more 
intuitively). When looking at changes to DocIdSetIterator, i definitely wanted 
it to be an optional thing because its so widespread, to minimize impact to the 
codebase.



> two phase intersection
> ----------------------
>
>                 Key: LUCENE-6198
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6198
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Robert Muir
>         Attachments: LUCENE-6198.patch
>
>
> Currently some scorers have to do a lot of per-document work to determine if 
> a document is a match. The simplest example is a phrase scorer, but there are 
> others (spans, sloppy phrase, geospatial, etc).
> Imagine a conjunction with two MUST clauses, one that is a term that matches 
> all odd documents, another that is a phrase matching all even documents. 
> Today this conjunction will be very expensive, because the zig-zag 
> intersection is reading a ton of useless positions.
> The same problem happens with filteredQuery and anything else that acts like 
> a conjunction.



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