更新时间:2023-01-21 11:31:47
结果证明此单元测试存在一些问题:
Turns out there were a couple of issues with this unit test:
HSQL的列名区分大小写(默认为大写).
HSQL's column names are case sensitive (and default to upper case).
如果Solr字段名称和db列名称相同,则还会添加具有整个db值的额外令牌.
If the Solr field name and the db column name are identical an extra token with the entire db value is also added.
字段定义应类似于:
<field column="solrField" splitBy="," sourceColName="TYPE" />
并且通常-使用RegexTransformer
将数据库中的单值字段与多值字段混合时:
And in general - when using the RegexTransformer
to mix single valued fields from a DB with multivalued fields:
如果使用splitBy
,则column
属性是Solr字段的名称. sourceColName
是数据库列
If using splitBy
then the column
attribute is the name of the Solr field. The sourceColName
is the database column
如果不使用splitBy
,则column
属性是数据库列名称,而name
属性是Solr字段.
If not using splitBy
then the column
attribute is the database column name and the name
attribute is the Solr field.