【发布时间】:2018-09-24 02:50:29
【问题描述】:
我是这个组合 sitecore 和 solr 东西的新手。我对不工作的模式标记器有一点问题。我正在关注这个文档
Sitecore 9 Solr: https://doc.sitecore.net/sitecore_experience_platform/setting_up_and_maintaining/search_and_indexing/using_solr_field_name_resolution
当我进行索引时,我的字段值是:a,b,c 我希望在 solr 上它会是 ["a","b","c"] 但它包含 ["a,b,c "]
这是我的 Sitecore 配置
<fieldMap>
<typeMatches hint="raw:AddTypeMatch">
<typeMatch type="System.Collections.Generic.List`1[System.String]" typeName="commaDelimitedCollection" fieldNameFormat="{0}_cd"
multiValued="true" settingType="Sitecore.ContentSearch.SolrProvider.SolrSearchFieldConfiguration, Sitecore.ContentSearch.SolrProvider"/>
</typeMatches>
<fieldNames hint="raw:AddFieldByFieldName">
<field fieldName="Keywords" returnType="commaDelimitedCollection"/>
</fieldNames>
</fieldMap>
这是我的 Solr 架构
<fieldType name="commaDelimited" class="solr.TextField" multiValued="true">
<analyzer>
<tokenizer class="solr.PatternTokenizerFactory" pattern="\s*,\s*"/>
</analyzer>
</fieldType>
<dynamicField name="*_cd" type="commaDelimited" multiValued="true" indexed="true" stored="true"/>
知道我上面的配置有什么问题吗?
谢谢
【问题讨论】: