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.
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
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.