コンテンツ アイテム テンプレートの 1 つで App.Config を介して、Sitecore 6.5 の Lucene に基づくインデックスを作成しようとしています。ここにリストされている「マスター」は、物理 SQL DB ではなくSC DBであることを忘れないでください。これが私のコードです:
<configuration xmlns:x="http://www.sitecore.net/xmlconfig/">
<sitecore>
<databases>
<database id="master" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
<Engines.HistoryEngine.Storage>
<obj type="Sitecore.Data.$(database).$(database)HistoryStorage, Sitecore.Kernel">
<param connectionStringName="$(id)" />
<EntryLifeTime>30.00:00:00</EntryLifeTime>
</obj>
</Engines.HistoryEngine.Storage>
<Engines.HistoryEngine.SaveDotNetCallStack>false</Engines.HistoryEngine.SaveDotNetCallStack>
</database>
</databases>
<search>
<configuration>
<indexes>
<index id="master" type="Sitecore.Search.Index, Sitecore.Kernel">
<param desc="name">$(id)</param>
<param desc="folder">master</param>
<Analyzer ref="search/analyzer" />
<locations hint="list:AddCrawler">
<master type="Sitecore.SharedSource.Search.Crawlers.AdvancedDatabaseCrawler,Sitecore.SharedSource.Search">
<Database>master</Database>
<Root>/sitecore/content/Data</Root>
<IndexAllFields>false</IndexAllFields>
<include hint="list:IncludeTemplate">
<template1>{EF11A8D0-D373-4A4B-90BA-16984D277612}</template1>
</include>
<fieldCrawlers hint="raw:AddFieldCrawlers">
<fieldCrawler type="Sitecore.SharedSource.Search.FieldCrawlers.LookupFieldCrawler,Sitecore.SharedSource.Search" fieldType="Single-Line Text" />
<fieldCrawler type="Sitecore.SharedSource.Search.FieldCrawlers.DateFieldCrawler,Sitecore.SharedSource.Search" fieldType="Multilist" />
</fieldCrawlers>
<!-- If a field type is not defined, defaults of storageType="NO", indexType="UN_TOKENIZED" vectorType="NO" boost="1f" are applied-->
<fieldTypes hint="raw:AddFieldTypes">
<!-- Text fields need to be tokenized -->
<fieldType name="single-line text" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<fieldType name="multi-line text" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<fieldType name="word document" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<fieldType name="html" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<fieldType name="rich text" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<fieldType name="memo" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<fieldType name="text" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<!-- Multilist based fields need to be tokenized to support search of multiple values -->
<fieldType name="multilist" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<fieldType name="treelist" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<fieldType name="treelistex" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<fieldType name="checklist" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
<!-- Legacy tree list field from ver. 5.3 -->
<fieldType name="tree list" storageType="NO" indexType="TOKENIZED" vectorType="NO" boost="1f" />
</fieldTypes>
</master>
</locations>
</index>
</indexes>
</configuration>
</search>
</sitecore>
</configuration>
この後にソリューションを実行しているときに、「Index Viewer」でインデックスを調べていますが、何も表示されませんでした。ここで何が間違っていますか?
このコードを追加しました:
private IDictionary<string, Sitecore.Search.Index> GetSearchIndexes()
{
var _configuration = Sitecore.Configuration.Factory.CreateObject("search/configuration", true) as Sitecore.Search.SearchConfiguration;
return _configuration.Indexes;
}
しかし、_configuration.Indexes の戻り値として、master、web、advanced を取得しています。私のインデックスは異なります。これらは DB のリストです。