Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 80542 invoked from network); 29 Apr 2009 09:23:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Apr 2009 09:23:00 -0000 Received: (qmail 20569 invoked by uid 500); 29 Apr 2009 09:22:59 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 20490 invoked by uid 500); 29 Apr 2009 09:22:59 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 20482 invoked by uid 99); 29 Apr 2009 09:22:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 09:22:58 +0000 X-ASF-Spam-Status: No, hits=-1995.0 required=10.0 tests=ALL_TRUSTED,URIBL_BLACK,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 Apr 2009 09:22:50 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 698F8234C003 for ; Wed, 29 Apr 2009 02:22:30 -0700 (PDT) Message-ID: <727998524.1240996950412.JavaMail.jira@brutus> Date: Wed, 29 Apr 2009 02:22:30 -0700 (PDT) From: "Michael McCandless (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1500) Highlighter throws StringIndexOutOfBoundsException In-Reply-To: <1541987559.1230000344227.JavaMail.jira@brutus> 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-1500?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12704047#action_12704047 ] Michael McCandless commented on LUCENE-1500: -------------------------------------------- bq. Should it not solve the issue? The change to highlighter (which is committed, on trunk) is simply to throw a more meaningful, checked exception (InvalidTokenOffsetsException) when the Token has out-of-bounds offsets. On upgrading to this, this is an exception your code needs to handle. But this issue doesn't fix the root causes that actually produce Tokens with incorrect offsets -- that's very app specific. EG, the particular case that led to this issue was SOLR-925 (which is now fixed). Are you actually hitting this exception at runtime, or noting that you need to handle it at compilation time? > Highlighter throws StringIndexOutOfBoundsException > -------------------------------------------------- > > Key: LUCENE-1500 > URL: https://issues.apache.org/jira/browse/LUCENE-1500 > Project: Lucene - Java > Issue Type: Bug > Components: contrib/highlighter > Affects Versions: 2.4 > Environment: Found this running the example code in Solr (latest version). > Reporter: David Bowen > Assignee: Mark Harwood > Fix For: 2.9 > > Attachments: Lucene-1500-NewException.patch, Lucene-1500-NewException.patch, LUCENE-1500.patch, patch.txt > > > Using the canonical Solr example (ant run-example) I added this document (using exampledocs/post.sh): > > Test for Highlighting StringIndexOutOfBoundsExcdption > Some Name > Acme, Inc. > Description of the features, mentioning various things > Features also is multivalued > 6 > true > > and then the URL http://localhost:8983/solr/select/?q=features&hl=true&hl.fl=features caused the exception. > I have a patch. I don't know if it is completely correct, but it avoids this exception. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org