: Hi, can anyone give me some pointers on making newer documents have a : better ranking/score? i.e. documents i indexed today have a higher : ranking/score in the index than documents that were index yesterday etc
This topic has come up more then once in the past, a good starting point at an approximation can be found here... http://mail-archives.apache.org/mod_mbox/lucene-java-user/200501.mbox/[EMAIL PROTECTED] ...but there is new a new "FunctionQuery" class in Jira that will allow for much better way to do this. In a nut shell: you create a FunctionQuery object on your (indexed) date field, and add it as an optional clause to a Boolean query that contains at least one required clause, and the function provides a score for every doc based on the value of it's date field. the code in Jira right now should work as is -- but I believe Yonik has allready completely rewriten the API to make more sense, so if you wait a few days it might be easier to use... http://issues.apache.org/jira/browse/LUCENE-446 -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]