Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 51089 invoked from network); 14 Feb 2006 05:50:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Feb 2006 05:50:35 -0000 Received: (qmail 84164 invoked by uid 500); 14 Feb 2006 05:50:34 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 83594 invoked by uid 500); 14 Feb 2006 05:50:31 -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 83576 invoked by uid 99); 14 Feb 2006 05:50:31 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Feb 2006 21:50:30 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 009F5DC for ; Tue, 14 Feb 2006 06:50:08 +0100 (CET) Message-ID: <2034102783.1139896208971.JavaMail.jira@ajax.apache.org> Date: Tue, 14 Feb 2006 06:50:08 +0100 (CET) From: "Kelvin Tan (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-446) FunctionQuery - score based on field value In-Reply-To: <1335068423.1128457428687.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/LUCENE-446?page=comments#action_12366302 ] Kelvin Tan commented on LUCENE-446: ----------------------------------- Yes, I've independently come up with something similar. What's interesting is that you can also perform filtering (like date filtering) by simply returning negative Float.MAX_VALUE. This pretty much guarantees that the document's final score is < 0. I've also come across the need to be able to modify the final score of a document, and have done this via a score-modifying query wrapper which delegates the scoring to the functionquery it wraps, then applying an additional function to it. Is that similar to the product function you mention? > FunctionQuery - score based on field value > ------------------------------------------ > > Key: LUCENE-446 > URL: http://issues.apache.org/jira/browse/LUCENE-446 > Project: Lucene - Java > Type: New Feature > Components: Search > Versions: 1.9 > Reporter: Yonik Seeley > Attachments: function.zip, function.zip > > FunctionQuery can return a score based on a field's value or on it's ordinal value. > FunctionFactory subclasses define the details of the function. There is currently a LinearFloatFunction (a line specified by slope and intercept). > Field values are typically obtained from FieldValueSourceFactory. Implementations include FloatFieldSource, IntFieldSource, and OrdFieldSource. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org