Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将一些参数传递给 Solr,这些参数应该会影响结果的权重(我不想过滤掉不符合这些标准的结果)。
例如,我想要一个语言属性,如果我将用户的语言传递给搜索引擎,我希望结果与首先列出的语言匹配。作为 Solr 的新手,我想知道这是否以及如何实现!
是的,这可以通过使用 boost 函数来实现。请参阅此FAQ 条目或 DisMaxQueryPlugin 的boost 函数描述(dismax 查询解析器是默认解析器)。