我正在學習如何爲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