: Subject: Recency weightage in Lucene : : I am thinking of modifying lucene's current ranking algorithm to include : the document's recency-weightage. So that the latest modified documents : gets preference over earlier modified documents, which makes sense for : news search.
FunctionQuery is your friend... http://incubator.apache.org/solr/docs/api/org/apache/solr/search/function/package-summary.html ..It's part of the Solr project, but it's extremely generic and should be usable out of the box with any Lucene app. : requirement is that document's lastModifiedTime is stored in the doc's : field, and extracting this value could be quite expensive for every : iteration in its posting stream. One approach could be to store it in a : separate file (like Normalization) to avoid field-lookup. if you store it as an indexed field, you can use the FieldCache to access it and it's a lot less expensive to look at at scoring time (if you look at the FunctionQuery support classes, this is what the FieldCacheSource class does) -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]