我正在学习如何为Sitecore 6.6设置和配置Lucene搜索索引。我将一个基本配置文件拼凑在一起,该文件将所有类型为“文章”模板的项目索引到树中所需的位置,并能够将所有项目从该索引中提取出来并显示结果中的名称。Sitecore 6.6 - 设置Lucene索引
现在我准备好定制该索引。我需要专门索引两个字段,并且遇到配置语法问题。这是两个领域的细分。我希望有人能够帮助我调整配置来解释这些字段。
Meta关键词 - 该字段(单行文本)不是文章模板的一部分,而是从另一个名为Meta Base的模板中提取,该文章从该文章继承。我不需要存储这个,只需要索引它就可以搜索。恩。值“ortho,pain,joint”
类别 - 此字段是指向树中类别项目的可用列表的下拉链接。我确实需要存储以及索引它,以便可以在搜索/显示这些Lucene文档的结果页面上使用它。
我似乎无法找到6.6的正确文档。 7+以上的文档存在,但它们在6.6中不起作用,因为事情似乎发生了显着变化。 Sitecore支持指导我一些旧文档,其中包含不推荐使用的代码以及没有编译的代码,而我读过的所有内容似乎都指向使用Contrib Search(我已经通过NuGet提取)。我想让它在没有Contrib的情况下工作,但是如果我需要的话,我会的。
这里是我的配置我没有了contrib东西创建:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<search>
<configuration>
<indexes>
<index id="my-custom-index" type="Sitecore.Search.Index, Sitecore.Kernel">
<!-- name - not sure if necessary but use id and forget about it -->
<param desc="name">$(id)</param>
<!-- folder - name of directory on the hard drive -->
<param desc="folder">__my-custom-index</param>
<!-- analyzer - reference to analyzer defined in Sitecore.config -->
<Analyzer ref="search/analyzer" />
<!-- list of locations to index - each of the with unique xml tag -->
<locations hint="list:AddCrawler">
<!-- first location (and the only one in this case) - specific folder from you question -->
<!-- type attribute is the crawler type - use default one in this scenario -->
<specificfolder type="Sitecore.Search.Crawlers.DatabaseCrawler,Sitecore.Kernel">
<!-- indexing items from web database -->
<Database>web</Database>
<!-- your folder path -->
<Root>/sitecore/content/Northwestern/in-care</Root>
<!-- Article Template -->
<include hint="list:IncludeTemplate">
<ContentHubArticle>{1E79E463-631A-4FBB-BEEA-3304D25F29CD}</ContentHubArticle>
</include>
<indexAllFields>true</indexAllFields>
</specificfolder>
</locations>
</index>
</indexes>
</configuration>
</search>
暂且,其实我已经禁用了SearchContrib指数,下定决心要摆脱的最现成的指标工作。我已经安装了indexviewer模块,并且由于 true indexAllFields>设置,我能够看到所有字段都获得了索引,尽管它们没有被存储,只有索引。我想禁用该设置,并只索引上面提到的两个字段,存储所提到的droplink值。我怀疑droplink会更困难,而且需要自定义代码,所以我先从单行文本框开始。 –
tjans
查看下面的3篇博文。他们应该回答你的所有问题:https://www.cognifide.com/blogs/sitecore/sitecore-6-lucene-search-the-most-basic-setup/ https://www.cognifide.com/blogs/sitecore /故障排除-Sitecore的-的Lucene搜索和索引/ https://www.cognifide.com/blogs/sitecore/troubleshooting-sitecore-lucene-search-and-indexing/ –
马立克,在那里你打算发布另一个链接?最后两个是对方的愚蠢。此外,我已经完成了这两个,他们都让我到现在的位置,但不提供如何指定特定字段进行索引以及如何配置是存储它们还是仅索引它们的解决方案,也不提供他们是否提供有关如何处理droplink字段的解决方案。 – tjans