Lucene - Core
  1. Lucene - Core
  2. LUCENE-2577

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

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.0.2
    • Fix Version/s: None
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      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?

        Activity

        Santiago M. Mola created issue -
        Santiago M. Mola made changes -
        Field Original Value New Value
        Priority Major [ 3 ] Minor [ 4 ]
        Mark Thomas made changes -
        Workflow jira [ 12516840 ] Default workflow, editable Closed status [ 12562680 ]
        Mark Thomas made changes -
        Workflow Default workflow, editable Closed status [ 12562680 ] jira [ 12583616 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Santiago M. Mola
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development