lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stlecho <stle...@gmail.com>
Subject Date Range Query: How to get a higher score for dates close to a reference date ?
Date Mon, 26 May 2008 11:21:39 GMT

Hi,

In the application I'm developing I'm able to query on 2 properties of my
model: Name and BirthDay. Records that have an exact match on the name
property and for which the birthday is close to the specified BirthDay query
parameter should have a higher score.

Does Lucene support the following scenario ? The user specifies a
ReferenceDate with a Tolerance. The ReferenceDate and Tolerance are used to
query the index and get the hits. The score of the hits should be based on
the "distance" between the ReferenceDate and the BirthDay of the hit. In
other words: BirthDays that are in the specified range, but closer to the
ReferenceDate should have a higher score.

Example:
The user wants to search persons born on 2003-05-01, but with a tolerance of
5 years (because the user is no sure about the exact birthyear)
-Reference Date: 2003-05-01
-Range Query: [1998-05-01 TO 2008-05-01]
-Results with birthday 1998-05-01 should have a lower score than results
with birthday 2003-01-01 (because this date is closer to the reference date
2003-05-01)

Regards, Stefan Lecho.
-- 
View this message in context: http://www.nabble.com/Date-Range-Query%3A-How-to-get-a-higher-score-for-dates-close-to-a-reference-date---tp17470154p17470154.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