【问题标题】:Solr relevancy using edismax使用 edismax 的 Solr 相关性
【发布时间】:2014-12-09 05:16:58
【问题描述】:

如何在 solr 配置中添加 edismax 来提升我的标题,然后是描述,然后是方面等等......

我的 solr 配置如下所示

<str name="defType">edismax</str>
<str name="qf">text^50 and title^1000 and contentdescription^180 and productname^140 and groupname^13 and maincontent^113 and contenttype^120 and published_date^115 and viewcount^114 and fileid^101 and filename^10 and content^10</str>
 <str name="pf">text^50 and title^1000 and contentdescription^180 and productname^140 and groupname^13 and maincontent^113 and contenttype^120 and published_date^115 and viewcount^114 and fileid^101 and filename^10 and content^10</str>

架构为

<copyField source="id" dest="text"/>
    <copyField source="productid" dest="text"/>
     <copyField source="groupid" dest="text"/>
   <copyField source="maincontent" dest="text"/>
   <copyField source="title" dest="text" />
   <copyField source="contentdescription" dest="text"/>
   <copyField source="groupname" dest="text"/>
   <copyField source="productname" dest="text"/>
   <copyField source="videourl" dest="text"/>
   <copyField source="contenttype" dest="text" />
<copyField source="title" dest="autocomplete-field" />

【问题讨论】:

    标签: search solr relevance edismax


    【解决方案1】:

    只需检查几件事...

    1. 从 qf 和 pf 中删除所有的 'and',字段名称列表仅以空格分隔,应如下所示:

    文本^50 标题^1000 内容描述^180 产品名称^140 组名^13 主要内容^113 内容类型^120 发布日期^115 观看次数^114 文件ID^101 文件名^10 内容^10

    1. 确保您包含在 qf 和 pf 中的所有字段都已编入索引(在字段定义中使用选项 indexed="true")

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-10
      • 1970-01-01
      • 2015-11-04
      • 1970-01-01
      • 2014-07-04
      • 1970-01-01
      • 1970-01-01
      • 2014-08-13
      相关资源
      最近更新 更多