Reputation: 363
I have a Solr index and each document is the information of an Event. In my schema Schedule is a multivalued field of type date. I am wondering if it is possible to boost the documents with a schedule date (any of those dates in the multivalued field) in the future and closest to the current date? I am using Dismax query and SolrNet client api.
Upvotes: 3
Views: 1148
Reputation: 7627
You can user Solr FunctionQuery - recip
.
Example function query:
recip(ms(NOW/HOUR,_datefield_),3.16e-11,1,1)
Also read relevancy FAQ: http://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_boost_the_score_of_newer_documents
Upvotes: 5