solr - 按非搜索字段对 Solr 分数进行加权

标签 solr

我的架构中包含了一个不是正在搜索的字段的字段,但我想按该字段的整数值对结果进行加权。

我很难在文档中找到如何做到这一点?此行为是在查询阶段还是索引阶段实现的?如何实现?

最佳答案

您可以使用Field based Boosting这可以让您根据字段提高结果。
该字段不必是正在搜索的字段。

你也可以Index time boosts对于字段

例如How_can_I_boost_the_score_of_newer_documents

如果您使用Dismax您可以使用boost queryboost 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).

enter image description here

关于solr - 按非搜索字段对 Solr 分数进行加权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12318443/

相关文章:

ruby-on-rails - 将 SOLR/Lucene 搜索与 Rails 应用程序集成 - 哪些 gem ?提示?

tomcat - 如何调试不返回记录的solr查询

SolrCloud 与 Solr 主从复制

使用LIKE子句进行Solr查询

solr - 自定义 Solr 函数查询

php - 如何在 php 中制作 Solr 多个 dataimporthandler 调度程序

apache - 如何或在何处运行$ ./nutch注入(inject)crawl/crawldb url

indexing - Solr 结果分组错误。字段 'vendor' 的意外文档值类型 SORTED_SET(预期=排序)

mysql - 快速实现非常大的索引文本搜索?

http - Solr 通过 HTTP 上的游标将文档获取为 CSV