Lucene - Core
  1. Lucene - Core
  2. LUCENE-3120

span query matches too many docs when two query terms are the same unless inOrder=true

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 4.9, Trunk
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      New

      Description

      spinoff of user list discussion - SpanNearQuery - inOrder parameter.

      With 3 documents:

      • "a b x c d"
      • "a b b d"
      • "a b x b y d"

      Here are a few queries (the number in parenthesis indicates expected #hits):

      These ones work as expected:

      • (1) in-order, slop=0, "b", "x", "b"
      • (1) in-order, slop=0, "b", "b"
      • (2) in-order, slop=1, "b", "b"

      These ones match too many hits:

      • (1) any-order, slop=0, "b", "x", "b"
      • (1) any-order, slop=1, "b", "x", "b"
      • (1) any-order, slop=2, "b", "x", "b"
      • (1) any-order, slop=3, "b", "x", "b"

      These ones match too many hits as well:

      • (1) any-order, slop=0, "b", "b"
      • (2) any-order, slop=1, "b", "b"

      Each of the above passes when using a phrase query (applying the slop, no in-order indication in phrase query).

      This seems related to a known overlapping spans issue - non-overlapping Span queries - as indicated by Hoss, so we might decide to close this bug after all, but I would like to at least have the junit that exposes the behavior in JIRA.

      1. LUCENE-3120.patch
        4 kB
        Doron Cohen
      2. LUCENE-3120.patch
        4 kB
        Doron Cohen
      3. LUCENE-3120.patch
        0.9 kB
        Steve Davids

        Issue Links

          Activity

          Steve Davids made changes -
          Attachment LUCENE-3120.patch [ 12669327 ]
          Steve Davids made changes -
          Link This issue is duplicated by LUCENE-5932 [ LUCENE-5932 ]
          Uwe Schindler made changes -
          Fix Version/s 4.9 [ 12326730 ]
          Fix Version/s 5.0 [ 12321663 ]
          Fix Version/s 4.8 [ 12326269 ]
          David Smiley made changes -
          Fix Version/s 4.8 [ 12326269 ]
          Fix Version/s 4.7 [ 12325572 ]
          Simon Willnauer made changes -
          Fix Version/s 4.7 [ 12325572 ]
          Fix Version/s 4.6 [ 12324999 ]
          Adrien Grand made changes -
          Fix Version/s 4.6 [ 12324999 ]
          Fix Version/s 5.0 [ 12321663 ]
          Fix Version/s 4.5 [ 12324742 ]
          Steve Rowe made changes -
          Fix Version/s 5.0 [ 12321663 ]
          Fix Version/s 4.5 [ 12324742 ]
          Fix Version/s 4.4 [ 12324323 ]
          Uwe Schindler made changes -
          Fix Version/s 4.4 [ 12324323 ]
          Fix Version/s 4.3 [ 12324143 ]
          Robert Muir made changes -
          Fix Version/s 4.3 [ 12324143 ]
          Fix Version/s 5.0 [ 12321663 ]
          Fix Version/s 4.2 [ 12323899 ]
          Mark Miller made changes -
          Fix Version/s 4.2 [ 12323899 ]
          Fix Version/s 4.1 [ 12321140 ]
          Mark Miller made changes -
          Fix Version/s 5.0 [ 12321663 ]
          Robert Muir made changes -
          Fix Version/s 4.1 [ 12321140 ]
          Fix Version/s 4.0 [ 12314025 ]
          Hoss Man made changes -
          Fix Version/s 3.6 [ 12319070 ]
          Simon Willnauer made changes -
          Fix Version/s 3.6 [ 12319070 ]
          Fix Version/s 3.5 [ 12317877 ]
          Michael McCandless made changes -
          Fix Version/s 3.5 [ 12317877 ]
          Fix Version/s 3.4 [ 12316675 ]
          Robert Muir made changes -
          Fix Version/s 3.4 [ 12316675 ]
          Fix Version/s 4.0 [ 12314025 ]
          Fix Version/s 3.3 [ 12316470 ]
          Robert Muir made changes -
          Fix Version/s 3.3 [ 12316470 ]
          Fix Version/s 4.0 [ 12314025 ]
          Fix Version/s 3.2 [ 12316070 ]
          Doron Cohen made changes -
          Attachment LUCENE-3120.patch [ 12479826 ]
          Doron Cohen made changes -
          Field Original Value New Value
          Attachment LUCENE-3120.patch [ 12479744 ]
          Doron Cohen created issue -

            People

            • Assignee:
              Unassigned
              Reporter:
              Doron Cohen
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:

                Development