开发者

How to boost fields in solr

开发者 https://www.devze.com 2023-04-12 05:45 出处:网络
I already have the boost determined before hand. I have a field in the solr index called boost1开发者_如何学JAVA . This boost field will have a value from 1 to 10 similar to google PR rank. This is th

I already have the boost determined before hand. I have a field in the solr index called boost1开发者_如何学JAVA . 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

  • Id
  • Title
  • Text
  • Boost1

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.

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.

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


I think you need to use index time document boosts. See this if you are indexing XML or this if using DataImportHandler.

0

精彩评论

暂无评论...
验证码 换一张
取 消