lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Elschot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-6308) SpansEnum, deprecate Spans
Date Thu, 05 Mar 2015 23:43:38 GMT

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

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

Even though this has another goal (avoiding use of positions as much as possible in spans),
the SpansEnum here really is very similar to the PositionInterval iterator at LUCENE-2878.
The main difference is that there is some state (begin/end positions) at LUCENE-2878, which
is only available in iterating/access methods in SpansEnum here:
{code}
  /**
   * Returns the next start position for the current doc.
   * There is always at least one start/end position per doc.
   * After the last start/end position at the current doc this returns {@link NO_MORE_POSITIONS}.
   */
  public abstract int nextStartPosition() throws IOException;

  /** Returns the end position for the current begin position. */
  public abstract int endPosition();
 
{code}

Since the code here is still very young and has this similarity, I would prefer the code here
to somehow converge to LUCENE-2878.
However, the state of the begin/end positions in LUCENE-2878 does not seem to allow convergence.
Any suggestions?

> 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
>         Attachments: LUCENE-6308.patch, LUCENE-6308.patch
>
>
> 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


Mime
View raw message