【发布时间】:2018-03-09 13:24:38
【问题描述】:
在运行 dspace filter-media 后在我的 dspace 服务器中搜索时,我看到了很多替换字符。我怎样才能忽略它们,或者说用空字符串替换它们?
我的第一个想法是做以下事情:
<fieldType name="title" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.PatternReplaceFilterFactory" pattern="�" replacement=""/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.KeywordTokenizerFactory"/>
<filter class="solr.LowerCaseFilterFactory"/>
</analyzer>
</fieldType>
但这仍然会在搜索结果中显示替换字符“�”。
【问题讨论】:
-
它会在您索引时过滤(而不是在搜索/查询时 - 这将在
query分析器中),因此您必须重新索引才能正确替换它。
标签: solr full-text-search dspace