Lucene - Core
  1. Lucene - Core
  2. LUCENE-2199

ShingleFilter skips over trie-shingles if outputUnigram is set to false

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.9, 2.9.1, 3.0
    • Fix Version/s: 2.9.2, 3.0.1, 4.0-ALPHA
    • Component/s: modules/analysis
    • Labels:
      None
    • Lucene Fields:
      New, Patch Available

      Description

      Spinoff from http://lucene.markmail.org/message/uq4xdjk26yduvnpa

      I noticed that if I set outputUnigrams to false it gives me the same output for
      maxShingleSize=2 and maxShingleSize=3.

      please divide divide this this sentence

      when i set maxShingleSize to 4 output is:

      please divide please divide this sentence divide this this sentence

      I was expecting the output as follows with maxShingleSize=3 and
      outputUnigrams=false :

      please divide this divide this sentence

      1. LUCENE-2199.patch
        6 kB
        Simon Willnauer
      2. LUCENE-2199.patch
        6 kB
        Simon Willnauer

        Activity

        Hide
        Simon Willnauer added a comment -

        This patch adds test for trigram and fourgram with and without outputUnigram. All tests pass

        Show
        Simon Willnauer added a comment - This patch adds test for trigram and fourgram with and without outputUnigram. All tests pass
        Hide
        Simon Willnauer added a comment -

        We should likely backport this to 2.9 / 3.0 too

        Show
        Simon Willnauer added a comment - We should likely backport this to 2.9 / 3.0 too
        Hide
        Simon Willnauer added a comment -

        last patch messed up the posInc - fixed it in this one

        Show
        Simon Willnauer added a comment - last patch messed up the posInc - fixed it in this one
        Hide
        Robert Muir added a comment -

        simon, your fix makes sense to me... i think you should commit it

        Show
        Robert Muir added a comment - simon, your fix makes sense to me... i think you should commit it
        Hide
        Simon Willnauer added a comment -

        I plan to commit this in today or tomorrow. Somebody volunteering to backport?

        simon

        Show
        Simon Willnauer added a comment - I plan to commit this in today or tomorrow. Somebody volunteering to backport? simon
        Hide
        Simon Willnauer added a comment -

        I committed this in revision 897672
        Robert, would you please backport this to 2.9 / 3.0 - thanks for the offer!

        simon

        Show
        Simon Willnauer added a comment - I committed this in revision 897672 Robert, would you please backport this to 2.9 / 3.0 - thanks for the offer! simon

          People

          • Assignee:
            Robert Muir
            Reporter:
            Simon Willnauer
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development