Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-370

BooleanQuery assumes everything else implements skipTo

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.4
    • Fix Version/s: 1.9
    • Component/s: core/search
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: All

    • Bugzilla Id:
      34407

      Description

      skipTo seems to be optional functionality on the Scorer class (BooleanScorer
      doesn't implement it). BooleanQuery.scorer() tests all subclauses using
      "instanceof BooleanQuery" to determine if it can use a ConjunctionScorer that
      requires skipTo functionality.

      This means that any other new Query/Scorer that don't implement skipTo will get
      into trouble when included in a BooleanQuery.

      If skipTo is really optional, then there should be some way of telling by the
      Scorer or the Query in a more generic manner.

      Some options:
      1) have a "boolean Scorer.hasSkipTo()" method
      2) have a "boolean Query.hasSkipTo()" method
      3) remove Scorer.skipTo and have a "public interface ScorerSkipTo

      {boolean skipTo(int doc)}

      " that scorers may implement

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              yseeley@gmail.com Yonik Seeley
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: