如何提升记录取决于Solr中的任何字段。
参考链接:https://wiki.apache.org/solr/SolrRelevancyFAQ#How_can_I_increase_the_score_for_specific_documents
但在我的情况下,我没有变得很清楚。
我在搜索后有一些记录

如何获取Id : 5,8,17和1不是最重要的,只是提升一些step.Because它的价格更高。
这是我的行查询;
select?mm=100%25&version=2.2&q=(book)&defType=edismax&spellcheck.q=(book)&qf=Price^10+Name^1+nGramContent&spellcheck=true&stats=true&facet.mincount=1&facet=true&spellcheck.collate=true&stats.field=Price&rows=50&indent=on&wt=json&fl=Id,score,Price请帮帮我。
谢谢!
发布于 2016-07-14 18:35:22
qf参数用于字段中的命中,不会影响排名,除非查询在字段中产生命中。您的示例将要求您搜索价格(而不是book),以查找要通过qf=Price^10参数提升的任何内容。
您链接到的常见问题解答了您的问题,但不是您引用的问题:How can I change the score of a document based on the value of a field。在示例中(根据您的情况将popularity替换为价格):
# simple boosts by popularity
defType=dismax&qf=text&q=supervillians&bf=popularity
q={!boost b=popularity}text:supervillians
# boosts based on complex functions of the popularity field
defType=dismax&qf=text&q=supervillians&bf=sqrt(popularity)
q={!boost b=sqrt(popularity)}text:supervilliansedismax使{!boost} (乘性boost)也可用作boost=参数,因此您可以直接引用它,而不是在查询中使用它。
https://stackoverflow.com/questions/38367342
复制相似问题