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

Phrase query with term repeated 3 times requires more slop than expected

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.3.1, 2.3.2
    • None
    • core/search
    • None
    • New

    Description

      Consider a document with the text "A A A".
      The phrase query "A A A" (exact match) succeeds.
      The query "A A A"~1 (same document and query, just increasing the slop value by one) fails.
      "A A A"~2 succeeds again.

      If the exact match succeeds, I wouldn't expect the same query but with more slop to fail. The fault seems to require some term to be repeated at least three times in the query, but the three occurrences do not need to be adjacent. I will attach a file that contains a set of JUnit tests that demonstrate what I mean.

      Attachments

        1. TestSloppyPhraseQuery.java
          3 kB
          Grant Glouser
        2. LUCENE-2.3.1-1310.patch
          13 kB
          Doron Cohen
        3. LUCENE-1310.patch
          10 kB
          Doron Cohen
        4. LUCENE-1310.patch
          11 kB
          Doron Cohen
        5. LUCENE-1310.patch
          12 kB
          Doron Cohen
        6. LUCENE-1310.patch
          13 kB
          Doron Cohen
        7. LUCENE-1310.patch
          13 kB
          Doron Cohen
        8. LUCENE-1310.1.patch
          2 kB
          Grant Glouser

        Activity

          People

            doronc Doron Cohen
            gglouser Grant Glouser
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment