lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Commented: (SOLR-1670) synonymfilter/map repeat bug
Date Sun, 20 Dec 2009 02:14:18 GMT


Yonik Seeley commented on SOLR-1670:

This is my mess that predates solr even going open source... I may have a few neurons that
can still recognize what it was trying to do.

The repeats test was testing that repeated rules didn't mess anything up.  In the code you
quote, the rule a  b -> ab is added twice.  The rule merging code should handle it (the
merging code handles merging all common prefixes).

Robert, can you tell if the flaw is in the test code or the SynonymFilter?  I'm pretty sure
that such a bug (in the filter) wasn't originally there... so my money would be on the test
- perhaps getTokList, but I haven't had a chance to look yet.

> synonymfilter/map repeat bug
> ----------------------------
>                 Key: SOLR-1670
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>    Affects Versions: 1.4
>            Reporter: Robert Muir
>         Attachments: SOLR-1670_test.patch
> 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.
> {code}
>     // 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!!!!! */
> {code}
> when converted to assertTokenStreamContents this problem surfaced. attached is an additional
assertion to the existing testcase.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message