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 5264573EF for ; Fri, 30 Sep 2011 12:48:14 +0000 (UTC) Received: (qmail 10759 invoked by uid 500); 30 Sep 2011 12:48:12 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 10690 invoked by uid 500); 30 Sep 2011 12:48:12 -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 10683 invoked by uid 99); 30 Sep 2011 12:48:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Sep 2011 12:48:12 +0000 X-ASF-Spam-Status: No, hits=-2000.5 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, 30 Sep 2011 12:48:08 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id E48032A25C3 for ; Fri, 30 Sep 2011 12:47:46 +0000 (UTC) Date: Fri, 30 Sep 2011 12:47:46 +0000 (UTC) From: "sebastian L. (Issue Comment Edited) (JIRA)" To: dev@lucene.apache.org Message-ID: <26032523.11216.1317386866937.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1920138710.45487.1316511189594.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Issue Comment Edited] (LUCENE-3440) FastVectorHighlighter: IDF-weighted terms for ordered fragments 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-3440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13118023#comment-13118023 ] sebastian L. edited comment on LUCENE-3440 at 9/30/11 12:46 PM: ---------------------------------------------------------------- WeightOrderFragmentsBuilder_table01.html: A one-word-query for *testament*. Obviously, the _sum-of-distinct-weights_-approach makes no difference to the existing one. ||Terms in fragment||totalWeight||totalBoost|| |testament testament|{color:blue}1.8171139{color}|{color:blue}2.0{color}| |testament|1.2848935|1.0| |testament|1.2848935|1.0| |testament|1.2848935|1.0| |testament|1.2848935|1.0| |testament|1.2848935|1.0| ---- WeightOrderFragmentsBuilder_table02.html: A more-word-query for *das alte testament*. Obviously, the _sum-of-boosts_-approach scores *das das das das* higher than *das alte testament*. ||Terms in fragment||totalWeight||totalBoost|| |das alte testament|{color:blue}5.799069{color}|3.0| |das alte testament|5.799069|3.0| |das testament alte|5.799069|3.0| |das alte testament|5.799069|3.0| |das testament|2.9178061|2.0| |das alte|2.9178061|2.0| |testament testament|1.8171139|2.0| |das das das das|1.5566137|{color:red}4.0{color}| |das das das|1.348067|3.0| |alte|1.2848935|1.0| |alte|1.2848935|1.0| |das das|1.100692|2.0| |das das|1.100692|2.0| |das|0.77830684|1.0| |das|0.77830684|1.0| |das|0.77830684|1.0| |das|0.77830684|1.0| |das|0.77830684|1.0| ---- Awesome table-formatting! was (Author: mdz-munich): WeightOrderFragmentsBuilder_table01.html: A one-word-query for *testament*. Obviously, the _sum-of-distinct-weights_-approach makes no difference to the existing one. ||Terms in fragment||totalWeight||totalBoost|| |testament testament|{color:blue}1.8171139{color}|{color:blue}2.0{color}| |testament|1.2848935|1.0| |testament|1.2848935|1.0| |testament|1.2848935|1.0| |testament|1.2848935|1.0| |testament|1.2848935|1.0| ---- WeightOrderFragmentsBuilder_table02.html: A more-word-query for *das alte testament*. Obviously, the _sum-of-boosts_-approach scores "das das das das" higher than "das alte testament". ||Terms in fragment||totalWeight||totalBoost|| |das alte testament|{color:blue}5.799069{color}|3.0| |das alte testament|5.799069|3.0| |das testament alte|5.799069|3.0| |das alte testament|5.799069|3.0| |das testament|2.9178061|2.0| |das alte|2.9178061|2.0| |testament testament|1.8171139|2.0| |das das das das|1.5566137|{color:red}4.0{color}| |das das das|1.348067|3.0| |alte|1.2848935|1.0| |alte|1.2848935|1.0| |das das|1.100692|2.0| |das das|1.100692|2.0| |das|0.77830684|1.0| |das|0.77830684|1.0| |das|0.77830684|1.0| |das|0.77830684|1.0| |das|0.77830684|1.0| ---- Awesome table-formatting! > FastVectorHighlighter: IDF-weighted terms for ordered fragments > ---------------------------------------------------------------- > > Key: LUCENE-3440 > URL: https://issues.apache.org/jira/browse/LUCENE-3440 > Project: Lucene - Java > Issue Type: Improvement > Components: modules/highlighter > Affects Versions: 3.5, 4.0 > Reporter: sebastian L. > Priority: Minor > Labels: FastVectorHighlighter > Fix For: 3.5, 4.0 > > Attachments: LUCENE-3.5-SNAPSHOT-3440-6-ProofOfConcept.java, LUCENE-3.5-SNAPSHOT-3440-6.patch, LUCENE-4.0-SNAPSHOT-3440-3.patch, WeightOrderFragmentsBuilder_table01.html, WeightOrderFragmentsBuilder_table02.html > > > The FastVectorHighlighter uses for every term found in a fragment an equal weight, which causes a higher ranking for fragments with a high number of words or, in the worst case, a high number of very common words than fragments that contains *all* of the terms used in the original query. > This patch provides ordered fragments with IDF-weighted terms: > total weight = total weight + IDF for unique term per fragment * boost of query; > The ranking-formula should be the same, or at least similar, to that one used in org.apache.lucene.search.highlight.QueryTermScorer. > The patch is simple, but it works for us. > Some ideas: > - A better approach would be moving the whole fragments-scoring into a separate class. > - Switch scoring via parameter > - Exact phrases should be given a even better score, regardless if a phrase-query was executed or not > - edismax/dismax-parameters pf, ps and pf^boost should be observed and corresponding fragments should be ranked higher -- 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