我的架构中包含了一个不是正在搜索的字段的字段,但我想按该字段的整数值对结果进行加权。
我很难在文档中找到如何做到这一点?此行为是在查询阶段还是索引阶段实现的?如何实现?
最佳答案
您可以使用Field based Boosting这可以让您根据字段提高结果。
该字段不必是正在搜索的字段。
你也可以Index time boosts对于字段
例如How_can_I_boost_the_score_of_newer_documents
如果您使用Dismax您可以使用boost query或boost function .
Use Document boost for multiplying the score
At indexing, users can specify that certain documents are more important than others, by assigning a document boost. For this, the score of each document is also multiplied by its boost value doc-boost(d).
关于solr - 按非搜索字段对 Solr 分数进行加权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12318443/