lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Commented) (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3971) MappingCharFilter rarely has wrong correctOffset (for finalOffset)
Date Thu, 12 Apr 2012 21:17:23 GMT


Robert Muir commented on LUCENE-3971:

Thanks Dawid!

Well the random test isnt totally efficient (it passes often and sometimes doesnt find the
corner case).
But I'll happily test the patch with it (I think if i just run it 100 times and it passes
I'm sold).

> MappingCharFilter rarely has wrong correctOffset (for finalOffset) 
> -------------------------------------------------------------------
>                 Key: LUCENE-3971
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>          Components: modules/analysis
>            Reporter: Robert Muir
>             Fix For: 4.0
>         Attachments: LUCENE-3971.patch, LUCENE-3971_test.patch
> Found this bug over on LUCENE-3969, but I'm currently tracking a ton of bugs, so
> I figure I would open an issue and see if this one is obvious to anyone:
> Consider this input string: "gzw f quaxot" (length = 12) with a WhitespaceTokenizer.
> If i have mapping rules like this, then it works!:
> {noformat}
> "t" => ""
> {noformat}
> But if I have mapping rules like this:
> {noformat}
> "t" => ""
> "tmakdbl" => "c"
> {noformat}
> Then it will compute final offset wrong:
> {noformat}
>     [junit] junit.framework.AssertionFailedError: finalOffset  expected:<12> but
> {noformat}
> Looks like some logic/recursion bug in the correctOffset method? The second rule is not
even "used" for this string,
> it just happens to also start with 't'

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message