【问题标题】:Is it possible to boost query results based on an unsearched field?是否可以基于未搜索的字段来提升查询结果?
【发布时间】:2011-04-08 15:31:28
【问题描述】:

我们的文档有关键字 meta,但我只想返回内容中关键字为 also 的文档(然后将文档提升到关键字为 only 在内容中)

谁能告诉我如何在 SOLR 中做到这一点?

非常感谢!

【问题讨论】:

    标签: solr


    【解决方案1】:

    您可以使用 ^ 字符来提升查询中的术语。例如

    q=(keywordField:searchTerm^1000 AND contentField:searchTerm)
    

    还可以查看documentation

    【讨论】:

      猜你喜欢
      • 2013-06-06
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-11-03
      • 2016-04-03
      • 1970-01-01
      相关资源
      最近更新 更多