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

Modify SpanNotQuery to act as SpanNotNearQuery too

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 4.3.1
    • 4.5, 6.0
    • core/search
    • None
    • 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

              dsmiley David Smiley
              tallison Tim Allison
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: