【发布时间】:2016-04-05 15:32:29
【问题描述】:
我正在尝试从 Drupal 环境中向 Solr 添加自定义字段。
我有 schema.xml 中的 Atm
<field name="custom_files" type="text" indexed="true" stored="true" termVectors="true"/>
虽然在 drupal 自定义模块中 hook_apachesolr_index_documents_alter() 是
foreach($documents as &$document){
$document->addField('custom_files', 'some long string');
在 solr 查询和模式浏览器中,'custom_files' 字段存在并且可以读取,但是,在一般搜索中它不返回任何内容。根据“custom_files”字段返回内容的唯一方法是直接在字段中搜索。
如何在常规搜索中使用 solr search 'custom_files' 字段?
注意:我也尝试使用动态字段定义创建我的字段,但结果相同。
【问题讨论】:
标签: apache drupal solr drupal-7 drupal-modules