How to get a better Lucene/Solr score if word quer

2019-07-04 00:11发布

I read at some point something explaining what to do to have Lucene/Solr give a better score if my queried word was found at the beginning of the description I indexed. Cannot find it anymore on the net. Anybody has the links handy ? Thank you.

标签: solr lucene
1条回答
做个烂人
2楼-- · 2019-07-04 00:58

Payloads could help you do that. Actually, payloads let you give an arbitrary boost to any token of your token stream, so you can boost depending on anything:

  • the position in the stream,
  • the font weight,
  • whether the token contains capital letters,
  • ...

You can read more about payloads in this nice post from Grant Ingersoll.

查看更多
登录 后发表回答