【问题标题】:Copy two or more fields into one field in Solr将两个或多个字段复制到 Solr 中的一个字段中
【发布时间】:2020-12-09 13:20:18
【问题描述】:

我想将多个字段复制到 Solr 中的一个特定字段。 我的要求是我想显示来自托管架构中可用的不同字段的建议。

我想将字段 diseasearea、enrollmenttype、机构名称和标题复制到字段“text_suggest”中。

然后我想显示来自“text_suggest”字段的建议。

谢谢。

【问题讨论】:

    标签: solr autosuggest


    【解决方案1】:

    您也可以使用复制字段。

    要复制的字段名称为源,复制的名称为目标。在schema.xml中,制作字段的副本非常简单:

    <copyField source="cat" dest="text" />
    
    <field name="newdescription" type="text_suggest" indexed="true" stored="true" multiValued="true" />
    
    
    <copyField source="diseasearea" dest="newdescription"/>
    <copyField source="enrollmenttype" dest="newdescription"/>
    <copyField source="institutionname" dest="newdescription"/>
    <copyField source="title" dest="newdescription"/>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多