You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Paul Elschot (JIRA)" <ji...@apache.org> on 2015/02/27 20:50:05 UTC

[jira] [Commented] (LUCENE-6308) SpansEnum, deprecate Spans

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

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

This avoids the problem of Spans going to the next document while at the end of scoring the current doc, for LUCENE-6250.

I tried to do this by adding the method Spans.nextAtCurrentDoc, but that was too invasive.

The current patch is incomplete, it adds SpansEnum as a subclass of DocIdSetIterator with methods nextStartPosition and endPosition.
It reimplements TermSpans as TermSpansEnum, and also adds SpansEnumScorer, SpansEnumWeight etc.
The real work is in NearSpans, still to be done.

The patch also deprecates Spans, SpanScorer, SpanWeight and SpanTermQuery, all in favour of added ...SpansEnum... counterparts.

Since SpansEnum inherits from DocIdSetIterator, just like Scorer, the SpansEnumScorer is actually simpler than SpanScorer.


> SpansEnum, deprecate Spans
> --------------------------
>
>                 Key: LUCENE-6308
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6308
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: core/search
>            Reporter: Paul Elschot
>            Priority: Minor
>
> An alternative for Spans that looks more like PositionsEnum.



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