lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marquinhocb <marquinh...@hotmail.com>
Subject Score for query-generated value
Date Tue, 01 Sep 2009 06:24:18 GMT

I would like to create a scorer that applies a score based on a value that is
calculated during a query.  More specifically, to apply a score based on
geographical distance from a latitude,longitude.

What is the easiest way to go about doing this?  The LocalLucene contrib
uses a SortComparatorSource, but I would like to, if possible, use the
scoring mechanism so that distance is scored just like all other fields,
thus allowing for searches which give more/less weight to distance (and for
example, more weight to a closer-matching search term).

Are there any good examples of how to do this? Or can someone point me in
the right direction?

Ideally I would create a CustomScoreQuery (instead of a ConstantScoreQuery)
that would take in a filter that would automatically give matching documents
a score, but I don't see a straight-forward way of doing this.
-- 
View this message in context: http://www.nabble.com/Score-for-query-generated-value-tp25234966p25234966.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message