Return-Path: Delivered-To: apmail-lucene-java-commits-archive@www.apache.org Received: (qmail 997 invoked from network); 11 Nov 2009 18:47:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 Nov 2009 18:47:30 -0000 Received: (qmail 9021 invoked by uid 500); 11 Nov 2009 18:47:30 -0000 Delivered-To: apmail-lucene-java-commits-archive@lucene.apache.org Received: (qmail 8972 invoked by uid 500); 11 Nov 2009 18:47:30 -0000 Mailing-List: contact java-commits-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-commits@lucene.apache.org Received: (qmail 8963 invoked by uid 99); 11 Nov 2009 18:47:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 18:47:30 +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.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Nov 2009 18:47:19 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 7FB3016E32; Wed, 11 Nov 2009 18:46:58 +0000 (GMT) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable From: Apache Wiki To: Apache Wiki Date: Wed, 11 Nov 2009 18:46:58 -0000 Message-ID: <20091111184658.5461.52604@eos.apache.org> Subject: =?utf-8?q?=5BLucene-java_Wiki=5D_Update_of_=22Payload=5FPlanning=22_by_Ka?= =?utf-8?q?yKay?= X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Lucene-java Wiki" f= or change notification. The "Payload_Planning" page has been changed by KayKay. The comment on this change is: Information about scorePayload method signat= ure that got deprecated . http://wiki.apache.org/lucene-java/Payload_Planning?action=3Ddiff&rev1=3D4&= rev2=3D5 -------------------------------------------------- =3D TODO for Payloads =3D + =3D=3D Background =3D=3D + Payloads allow Lucene users to optionally store a byte array of informati= on on a term by term basis. While payloads in general are here to stay, th= e specific implementation/API for payloads may not be. = - =3D=3D Background =3D=3D - Payloads allow Lucene users to optionally store a byte array of informati= on on a term by term basis. While payloads in general are here to stay, th= e specific implementation/API for payloads may not be. = - = - For background on Payloads see: - https://issues.apache.org/jira/browse/LUCENE-755 + For background on Payloads see: https://issues.apache.org/jira/browse/LUC= ENE-755 = http://www.gossamer-threads.com/lists/lucene/java-dev/43511?search_string= =3Dpayload;#43511 = http://www.gossamer-threads.com/lists/lucene/java-dev/43860?search_string= =3Dpayload; = =3D=3D TODO =3D=3D - = NOTE: This is just suggestions of what might be useful and are not necess= arily the final names, etc. = =3D=3D Query =3D=3D - = These queries probably should extend/use SpanQueries, b/c they rely on Te= rmPositions anyway. = 1. Probably create a package called payloads under search, similar to Sp= ans @@ -28, +24 @@ = 1. Payload*Query -- Ambitious contributors may find it useful to be able= to do the other types of queries (prefix, wildcard, etc.) = + =3D=3D Similarity and Scoring =3D=3D + While the Query implementations outlined above allow us to search payload= s, it is also useful to use the payload information for scoring. It should= be possible to override the following method in Similarity: = - =3D=3D Similarity and Scoring =3D=3D - While the Query implementations outlined above allow us to search payload= s, it is also useful to use the payload information for scoring. It should= be possible to add a method + Lucene 2.4 and before: + = + {{{ + public float scorePayload(byte[] data, int offset, int length) { } + }}} + Lucene 2.9+: + = + {{{ + public float scorePayload(int docId, String fieldName, int start, int e= nd, byte [] payload, int offset, int length) + }}} - onto Similarity called scorePayload(byte[] data, int offset, int length) = that can use the payload to score a term. It was suggested in the threads = above that a WeightedTermScorer be created, instead of altering the TermSco= rer so that performance issues are addressed. + that can use the payload to score a term. It was suggested in the thread= s above that a WeightedTermScorer be created, instead of altering the TermS= corer so that performance issues are addressed. = 3/17/2007: GSI: See https://issues.apache.org/jira/browse/LUCENE-834 for = an implementation of what I called BoostingTermQuery which does the weighti= ng of terms based on the payloads. = =3D=3D TermDocs and TermPositions =3D=3D + Thanks to https://issues.apache.org/jira/browse/LUCENE-761, we can merge = TermDocs and TermPositions and just use TermPositions. It may be possible = to then make all Query implementations be Span Queries, but judgment is out= on whether this is worthwhile or not. = - Thanks to https://issues.apache.org/jira/browse/LUCENE-761, we can merge = TermDocs and TermPositions and just use TermPositions. It may be possible = to then make all Query implementations be Span Queries, but judgment is out= on whether this is worthwhile or not. = -=20