I want to restrict the search index in Sitecore 7 to only scan one node of the content tree.
Currently the structure looks like this:
- sitecore
- content
- BaseNode
- $Company Node
- content
The index is indexing both BaseNode
& $Company Node
, but I only want it to index $Company Node
.
I've updated the default /sitecore/content
path in Sitecore.ContentSearch.config
, SitecoreContentSearch.Lucene.DefaultIndexConfiguration.config
, Sitecore.ContentSearch.Lucene.Index.Master
, and Sitecore.ContentSearch.LuceneIndex.Web.config
. When I updated the <root>
element to point to /sitecore/content/$CompanyNode
, I get the following exception when I try to rebuild the indexes.
Any ideas what I need to do to restrict Lucene to just index some items, and not everything?
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert)
at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
at Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert)
at Sitecore.Search.SearchManager.get_SearchConfiguration()
at Sitecore.Shell.Applications.Search.RebuildSearchIndex.RebuildSearchIndexForm.GetIndexes()
at Sitecore.Shell.Applications.Search.RebuildSearchIndex.RebuildSearchIndexForm.BuildIndexes()
Nested Exception
Exception: System.InvalidOperationException
Message: Root item is not defined
Source: Sitecore.Kernel
at Sitecore.Diagnostics.Assert.IsNotNull(Object value, String message)
at Sitecore.Search.Crawlers.DatabaseCrawler.Initialize(Index index)
at Sitecore.Search.Index.AddCrawler(ICrawler crawler)