Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 63701 invoked from network); 12 Jul 2007 00:19:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Jul 2007 00:19:34 -0000 Received: (qmail 34932 invoked by uid 500); 12 Jul 2007 00:19:29 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 34895 invoked by uid 500); 12 Jul 2007 00:19:28 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 34884 invoked by uid 99); 12 Jul 2007 00:19:28 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 17:19:28 -0700 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=DNS_FROM_AHBL_RHSBL,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of peterlkeegan@gmail.com designates 64.233.166.178 as permitted sender) Received: from [64.233.166.178] (HELO py-out-1112.google.com) (64.233.166.178) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2007 17:19:25 -0700 Received: by py-out-1112.google.com with SMTP id f31so6185619pyh for ; Wed, 11 Jul 2007 17:19:04 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=kIhQRrWLN9aY6Zn1fFcsP2EEp4j3McmE0mQJ5Nb0EqBt4fzPZ+CDjcV4MhwkpZFYoGihRnEFtwF8tWoEdXQIGp1ZTK5eR7+1Jf/r0NWRx5HNDOeuHcsDGvD/3NR+fTpDqQFj16lWfXm7wTKbj0qDPFdtfg7ZrLlZlmyVck7JO00= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=sdtoTramUlSFfT88w0CVplkzjKwZ2wFksVlhSkFHdsrutcF6pKIZufObTnQkC7NDVis7BmrF3wZM8UMxZ3e/hgnTTbFmQu5NETY8GKLqaGeapxZ+liHhV2UL8z/yV72jVJ/1DfyJymuO65i8wDyFC+qMDMN4nxLakvB8z0Jns+k= Received: by 10.65.189.20 with SMTP id r20mr29421qbp.1184199544127; Wed, 11 Jul 2007 17:19:04 -0700 (PDT) Received: by 10.65.154.8 with HTTP; Wed, 11 Jul 2007 17:19:04 -0700 (PDT) Message-ID: Date: Wed, 11 Jul 2007 20:19:04 -0400 From: "Peter Keegan" To: java-user@lucene.apache.org Subject: Re: Payloads and PhraseQuery In-Reply-To: <1C6823A4-BA05-4C20-8B74-3BE527E6CD97@apache.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13260_27299277.1184199544075" References: <1C6823A4-BA05-4C20-8B74-3BE527E6CD97@apache.org> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_13260_27299277.1184199544075 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm now looking at using payloads with SpanNearQuery but I don't see any clear way of getting the payload(s) from the matching span terms. The term positions for the payloads seem to be buried beneath SpanCells in the NearSpansOrdered and NearSpansUnordered classes, which are not public. I'd be content to be able to get the payload from just the first term of the span. Can anyone suggest an approach for making payloads work with SpanNearQuery? Peter On 6/27/07, Grant Ingersoll wrote: > > Could you get what you need combining the BoostingTermQuery with a > SpanNearQuery to produce a score? Just guessing here.. > > At some point, I would like to see more Query classes around the > payload stuff, so please submit patches/feedback if and when you get > a solution > > On Jun 27, 2007, at 10:45 AM, Peter Keegan wrote: > > > I'm looking at the new Payload api and would like to use it in the > > following > > manner. Meta-data is indexed as a special phrase (all terms at same > > position) and a payload is stored with the first term of each > > phrase. I > > would like to create a custom query class that extends PhraseQuery > > and uses > > its PhraseScorer to find matching documents. The custom query class > > then > > reads the payload from the first term of the matching query and > > uses it to > > produce a new score. However, I don't see how to get the payload > > from the > > PhraseScorer's TermPositions. Is this possible? > > > > > > Peter > > -------------------------- > Grant Ingersoll > Center for Natural Language Processing > http://www.cnlp.org/tech/lucene.asp > > Read the Lucene Java FAQ at http://wiki.apache.org/lucene-java/LuceneFAQ > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > ------=_Part_13260_27299277.1184199544075--