【问题标题】:Why a phrase is getting searched against default fields in solr为什么要针对 solr 中的默认字段搜索短语
【发布时间】:2013-02-14 05:57:56
【问题描述】:

这可能是一个非常愚蠢的问题,但我想知道为什么会这样。 如果我在 solr 中使用 edismax 查询解析器并传递如下查询

q=IPhone5&wt=xml&edismax=true&qf=Product-Name-0^100&bq=(Product-Rating-0%3A7^300+OR+Product-Rating-0%3A8^400+OR+Product-Rating-0%3A9^500+OR+Product-Rating-0%3A10^600+OR+Product-Rating-0%3A*)

那为什么要在默认字段中搜索呢? 当我指定 qf 时,它应该在 qf 参数中指定的字段中搜索并提升那些具有更高评分的文档。

如果我的理解有误,请纠正我。 注意:-我使用的是 SOLR 4.0 Alpha

谢谢, 文脉

【问题讨论】:

    标签: solr solrnet


    【解决方案1】:

    使用 RequestHandler 进行一些更改,如下所示。

    1.新增defType = edismax

    <str name="defType">edismax</str>
    

    2.删除默认字段。

    现在它正在按我的预期工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-06-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-08
      • 2012-08-12
      相关资源
      最近更新 更多