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

SpanNearQuery inconsistency: should it accept less than 2 clauses or not?

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.0.2
    • None
    • core/search
    • None
    • New

    Description

      NearSpansOrdered's constructor will throw an IllegalArgumentException
      if less than 2 clauses are given, while NearSpansOrdered won't.

      On the other hand, SpanNearQuery accepts less than 2 clauses and has explicit optimization for 0-caluse and 1-clause queries in getSpans() method.

      So, should SpanNearQuery accept less than 2 clauses or not?

      Attachments

        Activity

          People

            Unassigned Unassigned
            smolav Santiago M. Mola

            Dates

              Created:
              Updated:

              Slack

                Issue deployment