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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.1, 2.3.2
    • Fix Version/s: None
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      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. LUCENE-2.3.1-1310.patch
          13 kB
          Doron Cohen
        2. LUCENE-1310.patch
          13 kB
          Doron Cohen
        3. LUCENE-1310.patch
          13 kB
          Doron Cohen
        4. LUCENE-1310.patch
          12 kB
          Doron Cohen
        5. LUCENE-1310.patch
          11 kB
          Doron Cohen
        6. LUCENE-1310.1.patch
          2 kB
          Grant Glouser
        7. LUCENE-1310.patch
          10 kB
          Doron Cohen
        8. TestSloppyPhraseQuery.java
          3 kB
          Grant Glouser

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: