0

如何在 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" />
4

1 回答 1

0

只需检查几件事...

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

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

  1. 确保包含在 qf 和 pf 中的所有字段都已编入索引(在字段定义中使用选项 indexed="true")
于 2014-10-15T10:33:56.247 回答