Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 22527 invoked from network); 18 Aug 2009 22:32:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Aug 2009 22:32:18 -0000 Received: (qmail 27998 invoked by uid 500); 18 Aug 2009 22:32:36 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 27911 invoked by uid 500); 18 Aug 2009 22:32:36 -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 27903 invoked by uid 99); 18 Aug 2009 22:32:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Aug 2009 22:32:36 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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; Tue, 18 Aug 2009 22:32:34 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D259229A0012 for ; Tue, 18 Aug 2009 15:32:14 -0700 (PDT) Message-ID: <1833703219.1250634734860.JavaMail.jira@brutus> Date: Tue, 18 Aug 2009 15:32:14 -0700 (PDT) From: "Alex Vigdor (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Created: (LUCENE-1822) FastVectorHighlighter: SimpleFragListBuilder hard-coded 6 char margin is too naive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org FastVectorHighlighter: SimpleFragListBuilder hard-coded 6 char margin is to= o naive ---------------------------------------------------------------------------= ------- Key: LUCENE-1822 URL: https://issues.apache.org/jira/browse/LUCENE-1822 Project: Lucene - Java Issue Type: Improvement Components: contrib/* Affects Versions: 2.9 Environment: any Reporter: Alex Vigdor Priority: Minor Attachments: LUCENE-1822.patch The new FastVectorHighlighter performs extremely well, however I've found i= n testing that the window of text chosen per fragment is often very poor, a= s it is hard coded in SimpleFragListBuilder to always select starting 6 cha= racters to the left of the first phrase match in a fragment. When selectin= g long fragments, this often means that there is barely any context before = the highlighted word, and lots after; even worse, when highlighting a phras= e at the end of a short text the beginning is cut off, even though the enti= re phrase would fit in the specified fragCharSize. For example, highlighti= ng "Punishment" in "Crime and Punishment" returns "e and Punishment= " no matter what fragCharSize is specified. I am going to attach a patch t= hat improves the text window selection by recalculating the starting margin= once all phrases in the fragment have been identified - this way if a sing= le word is matched in a fragment, it will appear in the middle of the highl= ight, instead of 6 characters from the beginning. This way one can also gu= arantee that the entirety of short texts are represented in a fragment by s= pecifying a large enough fragCharSize. --=20 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