2011-09-09 51 views
1

我有一個現有的網站與Lucene搜索這充分完美的作品,但由於增加了新的領域(稱爲「內容」),以我的基本模板(模板從中所有其他的頁面模板繼承)它似乎並不可能對搜索這一新領域。Sitecore的搜索:新模板場沒有被包括在搜索索引

我曾嘗試以下:

  • 做一個「智能發佈」
  • 重建從控制面板中的搜索索引中Sitecore的桌面
  • 添加<IndexAllFields>true</IndexAllFields>設置的相應部分我web.config中

,但我有沒有運氣。有關背景信息在這裏是我的web.config,我添加了<IndexAllFields>元素的片段。 (這段代碼所在configuration\sitecore\search下)

<configuration type="Sitecore.Search.SearchConfiguration, Sitecore.Kernel" singleInstance="true"> 
    <indexes hint="list:AddIndex"> 
     <index id="system" type="Sitecore.Search.Index, Sitecore.Kernel"> 
     <param desc="name">$(id)</param> 
     <param desc="folder">__system</param> 
     <Analyzer ref="search/analyzer"/> 
     <locations hint="list:AddCrawler"> 
      <core type="Sitecore.Search.Crawlers.DatabaseCrawler,Sitecore.Kernel"> 
      <Database>core</Database> 
      <Root>/sitecore/content</Root> 
      <include hint="list:IncludeTemplate"> 
       <application>{EB06CEC0-5E2D-4DC4-875B-01ADCC577D13}</application> 
      </include> 
      <Tags>application</Tags> 
      <Boost>2.0</Boost> 
      </core> 
      <core-controlpanel type="Sitecore.Search.Crawlers.DatabaseCrawler,Sitecore.Kernel"> 
      <Database>core</Database> 
      <Root>/sitecore/content/applications/control panel</Root> 
      <include hint="list:IncludeTemplate"> 
       <taskoption>{BDB6FA46-2F76-4BDE-8138-52B56C2FC47E}</taskoption> 
      </include> 
      <Tags>taskoption</Tags> 
      <Boost>1.9</Boost> 
      </core-controlpanel> 
      <master type="Sitecore.Search.Crawlers.DatabaseCrawler, Sitecore.Kernel"> 
      <Database>master</Database> 
      <Tags>master content</Tags> 
      <IndexAllFields>true</IndexAllFields> 
      </master> 
     </locations> 
     </index> 
    </indexes> 
    </configuration> 

回答

0

我發現,如果你正在尋找一個單行文本字段舉行的文字,您需要添加以下到您的web.config文件下配置\ Sitecore的\ \指標指數\領域:

單行文本

此外,<IndexAllFields>true</IndexAllFields>元素僅適用於「新」式的搜索API。