在Solr 8.9中,我想通过分割字符串字段作为列表索引。
部分有效。
如果源字符串是A|B|C
。
索引完成后,Solr输出为:
"field": ["A|B|C", "A", B", "C"]
我希望它是:
"field": ["A", B", "C"]
有人可以解释我,为什么我有在我的多值字段,源字符串和分割字符串?
Mydata_config.xml
<document>
<entity name="items"
query="SELECT Id, Structures FROM Items"
transformer="RegexTransformer"
>
<field column="structures" splitBy="|" sourceColName="Structures" />
</entity>
</document>
以下是schema.xml
文件
<field name="structures" type="text_general" indexed="true" stored="true" multiValued="true" />
这是解决后更改我的列名。
我在data_config.xml
的查询:
query="SELECT Id, Structures as structures FROM Items"
schema.xml
文件中的字段定义
<field column="structures" splitBy="|" sourceColName="structures" />