Solr boost for multivalued date field

走远了吗. 提交于 2019-12-10 17:47:00

问题


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.


回答1:


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



来源:https://stackoverflow.com/questions/9152902/solr-boost-for-multivalued-date-field

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!