我在 Umbraco 7.6 的检查管理器中创建了一个索引器,并将搜索一些项目。我看到这是区分大小写的,我怎么能禁用它?
这是我所做的:
ExamineSettings.config
ExamineIndexProviders\provders
标签内:
<add name="ArtsenIndexer"
type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
supportUnpublished="false"
supportProtected="true"
indexSet="Artsen"
analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
ExamineSettings.config
ExamineSearchProviders\provders
标签内:
<add name="ArtsenSearcher"
type="UmbracoExamine.UmbracoExamineSearcher, UmbracoExamine"
supportUnpublished="false"
supportProtected="false"
indexSet="Artsen"
enableLeadingWildcard="true"
analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>
ExamineIndex.config
:
<IndexSet SetName="Artsen" IndexPath="~/App_Data/TEMP/ExamineIndexes/Artsen/" >
<IndexAttributeFields>
<add Name="id" />
<add Name="nodeName" />
<add Name="nodeTypeAlias"/>
<add Name="updateDate"/>
</IndexAttributeFields>
<IndexUserFields>
<add Name="email" />
<add Name="fax" />
<add Name="naam"/>
<add Name="onderzoeken"/>
<add Name="specialismen"/>
<add Name="subspecialismen"/>
<add Name="telefoon"/>
<add Name="titel"/>
<add Name="voornaam"/>
<add Name="website"/>
</IndexUserFields>
<IncludeNodeTypes>
<add Name="arts" />
</IncludeNodeTypes>
</IndexSet>
我在互联网上搜索了很多变体,但没有发现忽略大小写的结果。
更新:
在这篇文章中,我读过这个:
WhitespaceAnalyzer 是区分大小写的搜索器,
所以我必须使用这个:StandardAnalyzer
但没有帮助我。帖子里的链接坏了……