Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 201549844 for ; Sat, 14 Apr 2012 14:53:41 +0000 (UTC) Received: (qmail 5422 invoked by uid 500); 14 Apr 2012 14:53:38 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 5293 invoked by uid 500); 14 Apr 2012 14:53:38 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 5163 invoked by uid 99); 14 Apr 2012 14:53:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Apr 2012 14:53:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Apr 2012 14:53:37 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4089E36A376 for ; Sat, 14 Apr 2012 14:53:17 +0000 (UTC) Date: Sat, 14 Apr 2012 14:53:17 +0000 (UTC) From: "Koji Sekiguchi (Issue Comment Edited) (JIRA)" To: dev@lucene.apache.org Message-ID: <1493141584.25623.1334415197275.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1904536258.12414.1334153118636.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (LUCENE-3971) MappingCharFilter rarely has wrong correctOffset (for finalOffset) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-3971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13254129#comment-13254129 ] Koji Sekiguchi edited comment on LUCENE-3971 at 4/14/12 2:52 PM: ----------------------------------------------------------------- bq. Thanks again for taking care of this: I think this could be a good candidate for 3.6.1? +1 was (Author: koji): bq. Thanks again for taking care of this: I think this could be a good candidate for 3.6.1? > MappingCharFilter rarely has wrong correctOffset (for finalOffset) > ------------------------------------------------------------------- > > Key: LUCENE-3971 > URL: https://issues.apache.org/jira/browse/LUCENE-3971 > Project: Lucene - Java > Issue Type: Bug > Components: modules/analysis > Reporter: Robert Muir > Assignee: Dawid Weiss > 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 was:<11> > {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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org