lucene-dev mailing list archives

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


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:
   * 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();

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message