Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-1670

synonymfilter/map repeat bug

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 1.4
    • None
    • Schema and Analysis
    • None

    Description

      as part of converting tests for SOLR-1657, I ran into a problem with synonymfilter

      the test for 'repeats' has a flaw, it uses this assertTokEqual construct which does not really validate that two lists of token are equal, it just stops at the shorted one.

          // repeats
          map.add(strings("a b"), tokens("ab"), orig, merge);
          map.add(strings("a b"), tokens("ab"), orig, merge);
          assertTokEqual(getTokList(map,"a b",false), tokens("ab"));
          /* in reality the result from getTokList is ab ab ab!!!!! */
      

      when converted to assertTokenStreamContents this problem surfaced. attached is an additional assertion to the existing testcase.

      Attachments

        1. SOLR-1670_test.patch
          0.6 kB
          Robert Muir
        2. SOLR-1670.patch
          4 kB
          Yonik Seeley
        3. SOLR-1670.patch
          13 kB
          Steven Rowe
        4. SOLR-1670.patch
          13 kB
          Steven Rowe

        Issue Links

          Activity

            People

              yseeley@gmail.com Yonik Seeley
              rcmuir Robert Muir
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: