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

Sloppy Phrase Scorer matches the doc "A B C D E" for query = "B C B"~2

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: core/search
    • Labels:
      None
    • Lucene Fields:
      Patch Available

      Description

      This is an extension of https://issues.apache.org/jira/browse/LUCENE-697

      In addition to abnormalities Yonik pointed out in 697, there seem to be other issues with slopy phrase search and scoring.

      1) A phrase with a repeated word would be detected in a document although it is not there.
      I.e. document = A B D C E , query = "B C B" would not find this document (as expected), but query "B C B"~2 would find it.
      I think that no matter how large the slop is, this document should not be a match.

      2) A document containing both orders of a query, symmetrically, would score differently for the queru and for its reveresed form.
      I.e. document = A B C B A would score differently for queries "B C"~2 and "C B"~2, although it is symmetric to both.

      I will attach test cases that show both these problems and the one reported by Yonik in 697.

        Attachments

        1. sloppy_phrase_tests.patch.txt
          12 kB
          Doron Cohen
        2. perf-search-new.log
          184 kB
          Doron Cohen
        3. perf-search-orig.log
          184 kB
          Doron Cohen
        4. sloppy_phrase_java.patch.txt
          12 kB
          Doron Cohen
        5. res-search-new2.log
          363 kB
          Doron Cohen
        6. res-search-orig2.log
          364 kB
          Doron Cohen
        7. sloppy_phrase.patch2.txt
          25 kB
          Doron Cohen
        8. sloppy_phrase.patch3.txt
          27 kB
          Doron Cohen
        9. sloppy_phrase.patch3.txt
          30 kB
          Doron Cohen

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: