如何提高Solr中的字段 [英] How to boost fields in solr

查看:109
本文介绍了如何提高Solr中的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经事先确定了提升的动力.我在solr索引中有一个名为boost1的字段.该提升字段的值将介于1到10之间,与Google PR等级相似.这是应该应用于solr中运行的每个查询的提升.这是我索引中的字段

I already have the boost determined before hand. I have a field in the solr index called boost1 . This boost field will have a value from 1 to 10 similar to google PR rank. This is the boost that should be applied to every query ran in solr. here are the fields in my index

  • 编号
  • 标题
  • 文字
  • Boost1

boost字段应应用于每个查询.我正在尝试实现类似于Google PR rank的功能.有没有办法使用solr来做到这一点?

The boost field should be apply to every query. I am trying to implement functionality similar to Google PR rank. Is there a way to do this using solr?

推荐答案

例如,您可以在查询期间添加增强功能.

you can add the boost during query e.g.

q={!boost b=boost1}

How_can_I_boost_the_score_of_newer_documents

但是,您可能需要显式添加它.

However, this may need to be added explicitly by you.

如果将dismaxedismax与请求处理程序一起使用,则可以使用bf(增强功能)参数来增强文档. http://wiki.apache.org/solr/DisMaxQParserPlugin#bf_.28Boost_Functions.29

If you are using dismax or edismax with the request handler, The bf (Boost Functions) parameter could be used to boost the documents. http://wiki.apache.org/solr/DisMaxQParserPlugin#bf_.28Boost_Functions.29

bf=boost1^0.5

这可以添加到带有请求处理程序定义的默认值中,以便将它们应用于所有搜索查询.

This can be added to defaults with the request handler definition, so that they are applied to all the search queries.

您可以使用函数查询来改变增强量 FunctionQuery

you can use function queries to vary the amount of boost FunctionQuery

这篇关于如何提高Solr中的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆