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

Modify SpanNotQuery to act as SpanNotNearQuery too

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3.1
    • Fix Version/s: 4.5, 6.0
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      With very small modifications, SpanNotQuery can act as a SpanNotNearQuery.

      To find "a" but not if "b" appears 3 tokens before or 4 tokens after "a":
      new SpanNotQuery("a", "b", 3, 4)

      Original constructor still exists and calls SpanNotQuery("a", "b", 0, 0).

      Patch with tests on way.

        Attachments

        1. LUCENE-5091.patch
          13 kB
          David Smiley
        2. LUCENE-5091.patch.txt
          11 kB
          Tim Allison

          Issue Links

            Activity

              People

              • Assignee:
                dsmiley David Smiley
                Reporter:
                tallison@mitre.org Tim Allison
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: