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

Paul Elschot commented on LUCENE-6308:
--------------------------------------

For the NO_MORE_POSITIONS: personally I actually slightly prefer to have a 
boolean method, however for consistency with the doc id iteration I implemented 
it as Integer.MAX_VALUE.
So I'm fine with both solutions.

About cost(): we need a good overall view for that, I did not try that for now.
I changed OrSpans cost() because I suspected an initalization problem, I'll 
change that to precomputed again.

The payload collection in NearSpansOrdered needs work. I'd prefer to leave that 
to a subclass for the ordered case.
For now I'll check the collectPayloads passing in SpanNearQuery.

SpanPositionCheckQuery hashCode and equals are indeed needed, iirc these were 
already lacking.

SpanNear: when the subSpans are initialized and one of them is null, null is 
returned for the NearSpans... .
I think SpanNear should have at least two subqueries, I did not expect that to 
break backward compatibility.
The single subquery case could be restored, but is it really needed? When this 
happens the caller should be aware that the slop is going to be ignored, and in 
the ordered case there should be no match at all because the subSpans should 
not overlap then.

SpanNotQuery and SpanScorer: as I understood there is no need for these two 
implement TwoPhaseIterator because that is only needed when there is some form 
of conjunction. SpanScorer only takes a single Spans, and for SpanNot advance() 
on the excluded spans only is good enough.

Removing Spans/intervals completely is not an option: with (nested) proximity 
queries there is no way to avoid iterating over intervals/spans. We can make 
the scoring consistent between Spans and PhraseQuery, and PhraseQuery with 
getSpans() would also be good for performance of common cases.


> SpansEnum, deprecate Spans
> --------------------------
>
>                 Key: LUCENE-6308
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6308
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>    Affects Versions: Trunk
>            Reporter: Paul Elschot
>            Priority: Minor
>         Attachments: LUCENE-6308-changeapi.patch, 
> LUCENE-6308-changeapi.patch, LUCENE-6308-changeapi.patch, LUCENE-6308.patch, 
> LUCENE-6308.patch, LUCENE-6308.patch, LUCENE-6308.patch, LUCENE-6308.patch, 
> LUCENE-6308.patch
>
>
> An alternative for Spans that looks more like PositionsEnum and adds two 
> phase doc id iteration



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