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 37A589005 for ; Fri, 4 Nov 2011 08:43:25 +0000 (UTC) Received: (qmail 51521 invoked by uid 500); 4 Nov 2011 08:43:23 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 51466 invoked by uid 500); 4 Nov 2011 08:43:23 -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 51459 invoked by uid 99); 4 Nov 2011 08:43:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Nov 2011 08:43:23 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,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; Fri, 04 Nov 2011 08:43:21 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4B94E33175D for ; Fri, 4 Nov 2011 08:43:00 +0000 (UTC) Date: Fri, 4 Nov 2011 08:43:00 +0000 (UTC) From: "Terje Eggestad (Updated) (JIRA)" To: dev@lucene.apache.org Message-ID: <1124784174.245.1320396180310.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Updated] (LUCENE-2587) Highlighter picks wrong offset for fragment boundaries 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-2587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Terje Eggestad updated LUCENE-2587: ----------------------------------- Attachment: IMSentenceFragmenter.java Sentence Fragmenter > Highlighter picks wrong offset for fragment boundaries > ------------------------------------------------------ > > Key: LUCENE-2587 > URL: https://issues.apache.org/jira/browse/LUCENE-2587 > Project: Lucene - Java > Issue Type: Bug > Components: modules/highlighter > Affects Versions: 3.0.2 > Environment: Java 6 + Lucene 3.0.2 > Reporter: Terje Eggestad > Priority: Trivial > Labels: newdev > Attachments: IMSentenceFragmenter.java, LUCENE-2587.patch > > > I have written a new Fragmenter since we need fragments for hitlines to be on sentence boundaries and not cross paragraphs. > When using it with org.apache.lucene.search.highlight.Highlighter, I get hitlines that starts with ". ", "? ", "! "... > Consider the text "A b c d e. F g h i j! K l m n o. " > which become the tokenstream : (A) (b) (c) (d) (e) (F) (g) (h) (i) (j) (K) (l) (m) (n) (o) > If the fragmenter return isNewFragment() = true on F and K and Highlighter pick the middle fragment, lets say we search on "g" the hitline becomes: > ". F g h i j" > The reason, it seems, is that the offset to the fragment boundaries found by taking the endOffset of the last token in a fragment , > not the startOffset of the first. > TJ -- 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