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

Adrien Grand commented on LUCENE-6198:
--------------------------------------

bq. Well then TwoPhaseIterator could take it in its constructor, put it on a 
field, and then return it from approximation() as a default implementation.

I'm good with either way. :-)

bq. TwoPhaseIterator's javadocs should make a reference to 
Scorer.asTwoPhaseIterator.

+1

bq. Why is Scorer.asTwoPhaseIterator on Scorer and not DocIdSetIterator? It 
would make this capability more general.

It was on DocIdSetIterator in Robert's initial patch but we ended up moving it 
to Scorer only. If we had it on DocIdSetIterator it would allow approximations 
to have approximations themselves, which I'm not sure how this should be dealt 
with. Not necessarily a big deal, but putting this API on Scorer only for now 
was helpful to reduce the complexity. I'm curious if you have ideas to take 
advantage of approximations in another context than scorers?



> two phase intersection
> ----------------------
>
>                 Key: LUCENE-6198
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6198
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Robert Muir
>            Assignee: David Smiley
>             Fix For: Trunk, 5.1
>
>         Attachments: LUCENE-6198.patch, LUCENE-6198.patch, LUCENE-6198.patch, 
> LUCENE-6198.patch, LUCENE-6198.patch, phrase_intersections.tasks
>
>
> 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