Lucene - Core
  1. Lucene - Core
  2. LUCENE-2337

DisjunctionSumScorer and ScorerDocQueue javadocs and one method name out of date after move from skipTo() to advance()

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.1
    • Labels:
      None
    • Lucene Fields:
      New

      Activity

      Paul Elschot made changes -
      Status Resolved [ 5 ] Closed [ 6 ]
      Paul Elschot made changes -
      Status Open [ 1 ] Resolved [ 5 ]
      Resolution Fixed [ 1 ]
      Hide
      Paul Elschot added a comment -

      Later patches have meanwhile inlined the scorer queue and removed the offending javadocs.

      Show
      Paul Elschot added a comment - Later patches have meanwhile inlined the scorer queue and removed the offending javadocs.
      Robert Muir made changes -
      Fix Version/s 4.1 [ 12321140 ]
      Fix Version/s 4.0 [ 12314025 ]
      Mark Thomas made changes -
      Workflow Default workflow, editable Closed status [ 12563453 ] jira [ 12584931 ]
      Mark Thomas made changes -
      Workflow jira [ 12502495 ] Default workflow, editable Closed status [ 12563453 ]
      Hide
      Shai Erera added a comment -

      Note that -1 is a valid return value in case doc() is called before nextDoc(). However it is not valid for nextDoc() and advance().

      Show
      Shai Erera added a comment - Note that -1 is a valid return value in case doc() is called before nextDoc(). However it is not valid for nextDoc() and advance().
      Paul Elschot made changes -
      Summary DisjunctionSumScorer and ScorerDocQueue javadocs one method name out of date after move from skipTo() to advance() DisjunctionSumScorer and ScorerDocQueue javadocs and one method name out of date after move from skipTo() to advance()
      Hide
      Paul Elschot added a comment -

      Is there an easy way to determine all places where the javadocs mention a -1 that should be NO_MORE_DOCS ?

      Show
      Paul Elschot added a comment - Is there an easy way to determine all places where the javadocs mention a -1 that should be NO_MORE_DOCS ?
      Paul Elschot made changes -
      Field Original Value New Value
      Attachment LUCENE-2337.patch [ 12439403 ]
      Hide
      Paul Elschot added a comment - - edited

      The patch updates the javadocs for the move from skipTo() to advance().

      It also renames the public method ScorerDocQueue.topSkipToAndAdjustElsePop to topAdvanceAndAdjustElsePop.
      Although this is a public API change, I don't think it is worthwhile to use deprecation for this, because the method is really Lucene internal.

      There are also some older things changed: the remark that skipTo() is used is removed (all scorers meanwhile have implemented skipTo() and have moved to advance()), and some commented code lines have are removed.

      Show
      Paul Elschot added a comment - - edited The patch updates the javadocs for the move from skipTo() to advance(). It also renames the public method ScorerDocQueue.topSkipToAndAdjustElsePop to topAdvanceAndAdjustElsePop. Although this is a public API change, I don't think it is worthwhile to use deprecation for this, because the method is really Lucene internal. There are also some older things changed: the remark that skipTo() is used is removed (all scorers meanwhile have implemented skipTo() and have moved to advance()), and some commented code lines have are removed.
      Hide
      Uwe Schindler added a comment -

      Also Javadocs of lots of Scorers or DocIdSetIterators mention a return value of -1 for nextDoc() and advance() instead of NO_MORE_DOCS.

      Show
      Uwe Schindler added a comment - Also Javadocs of lots of Scorers or DocIdSetIterators mention a return value of -1 for nextDoc() and advance() instead of NO_MORE_DOCS.
      Paul Elschot created issue -

        People

        • Assignee:
          Unassigned
          Reporter:
          Paul Elschot
        • Votes:
          0 Vote for this issue
          Watchers:
          1 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved:

            Development