You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Kelvin Tan (JIRA)" <ji...@apache.org> on 2006/02/14 06:50:08 UTC

[jira] Commented: (LUCENE-446) FunctionQuery - score based on field value

    [ 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