Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 51950 invoked from network); 9 May 2008 14:08:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 May 2008 14:08:41 -0000 Received: (qmail 17854 invoked by uid 500); 9 May 2008 14:08:35 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 17829 invoked by uid 500); 9 May 2008 14:08:35 -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 17818 invoked by uid 99); 9 May 2008 14:08:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 May 2008 07:08:35 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [140.203.201.100] (HELO mx1.nuigalway.ie) (140.203.201.100) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 May 2008 14:07:42 +0000 X-IronPort-AV: E=Sophos;i="4.27,460,1204502400"; d="scan'208";a="216368471" Received: from exbe1.ac.nuigalway.ie (HELO EVS1.ac.nuigalway.ie) ([10.132.157.11]) by mx1.nuigalway.ie with ESMTP; 09 May 2008 15:08:23 +0100 Received: from [10.2.17.36] ([140.203.154.11]) by EVS1.ac.nuigalway.ie with Microsoft SMTPSVC(6.0.3790.3959); Fri, 9 May 2008 15:07:33 +0100 Message-ID: <48245AB3.2000102@deri.org> Date: Fri, 09 May 2008 15:07:47 +0100 From: Paolo Capriotti User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: java-user@lucene.apache.org Subject: Using stored fields for scoring Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 09 May 2008 14:07:34.0051 (UTC) FILETIME=[0720DF30:01C8B1DE] X-Virus-Checked: Checked by ClamAV on apache.org Hi all, I am looking for a way to include a stored (non-indexed) field in the computation of scores for a query. I have tried using a ValueSourceQuery with a ValueSource subclass that simply retrieves the document and gets the field, like: public float floatVal(int doc) { reader.document(doc, selector).getBinaryValue("myfield"); .... } but that's too slow, because it ends up doing a lookup for each matching document. Is it possible to use a stored field in a FunctionQuery or ValueSourceQuery in an efficient way (i.e. not dependent on the number of retrieved documents)? If the answer is yes, is it possible to update such a value in place without removing and reindexing the document? Thanks in advance. Paolo Capriotti --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org