Java С;将多个SOLR字段合并为一个
我有几个具有相似模式名称(text_*)的动态Solr字段,例如“text_1”、“text_2”、“text_3”。我需要将所有这些属性组合成一个多值属性:[“text_1”、“text_2”、“text_3”] 我已尝试对模式使用下一种方法:Java С;将多个SOLR字段合并为一个,java,solr,lucene,Java,Solr,Lucene,我有几个具有相似模式名称(text_*)的动态Solr字段,例如“text_1”、“text_2”、“text_3”。我需要将所有这些属性组合成一个多值属性:[“text_1”、“text_2”、“text_3”] 我已尝试对模式使用下一种方法: <dynamicField name="text_*" type="string" stored="true"/> <dynamicField name="allTexts" class="solr.StrField" sort
<dynamicField name="text_*" type="string" stored="true"/>
<dynamicField name="allTexts" class="solr.StrField" sortMissingLast="true" docValues="true" multiValued="true" stored="true"/>
<copyField source="text_*" dest="allTexts"/>
也许还有其他方法可以将动态字段按字段名模式组合成一个多值字段?您想定义一个常规字段,而不是一个动态字段(即您键入的字段) 动态字段要求在名称中的某个位置存在通配符(因为动态字段就是这样的,它支持字段名称的通配符匹配) 换成
<field name="allTexts" class="solr.StrField" sortMissingLast="true" docValues="true" multiValued="true" stored="true" />
您想要定义一个常规字段,而不是一个动态字段(您已经键入) 动态字段要求在名称中的某个位置存在通配符(因为动态字段就是这样的,它支持字段名称的通配符匹配) 换成
<field name="allTexts" class="solr.StrField" sortMissingLast="true" docValues="true" multiValued="true" stored="true" />