Search code examples
luceneumbracolucene.netumbraco7examine

Examine ExternalIndexer returns empty Index


I have a problem where my External Index refuses to obtain any kind of data when rebuild. When rebuilding the index, it removes any entry in the index. My Internal Index works just fine, and contains every node in Umbraco.

I thought it might be a bad node/entry, and have therefore made a backup of the entire database, and in an isolated environment I then started deleting sections, hopen that one of the sections would remove the problem.

Now I have deleted all of my content, and added one new entry. And still my External Index insists on being empty.

  • What can I do to troubleshoot this further?
  • Is there some way I can debug my ExternalIndexer to see what it is that is stirring up the trouble?
  • Does anyone know what the problem could be?

I'm sporting a Umbraco version 7.1.8 assembly: 1.0.5394.16131

My Examine settings for the Indexers

<ExamineIndexProviders>
 <providers>
  <add name="InternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
       supportUnpublished="true"
       supportProtected="true"
       analyzer="Lucene.Net.Analysis.WhitespaceAnalyzer, Lucene.Net"/>

  <add name="InternalMemberIndexer" type="UmbracoExamine.UmbracoMemberIndexer, UmbracoExamine"
       supportUnpublished="true"
       supportProtected="true"
       analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>

  <!-- default external indexer, which excludes protected and unpublished pages-->
  <add name="ExternalIndexer" type="UmbracoExamine.UmbracoContentIndexer, UmbracoExamine"
                 analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>

  <add name="UserIndexer" type="Sinas.Factories.Search.AutoConfiguredExamineUserIndexer, Sinas.Factories" 
                 analyzer="Lucene.Net.Analysis.Standard.StandardAnalyzer, Lucene.Net"/>

 </providers>
</ExamineIndexProviders> 

My IndexSet for ExternalIndexSet

<!-- Default Indexset for external searches, this indexes all fields on all types of nodes-->
  <IndexSet SetName="ExternalIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/External/" />
  <IndexSet SetName="UserIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/User/">
    <IndexUserFields>
      <add Name="id" />
      <add Name="nodeTypeAlias" />
      <add Name="fullName" />
      <add Name="firstName" />
      <add Name="lastName" />
            <add Name="datatitle" />
            <add Name="dataemail" />
            <add Name="dataphone" />
            <add Name="datamobilephone" />
            <add Name="dataskype" />
      <add Name="_unit" />
      <add Name="_unitId" />
      <add Name="_unitIdPath" />
      <add Name="_tagIds" />
      <add Name="_tags" />
      <add Name="_workGroupIds" />
      <add Name="_workGroups" />
            <add Name="_type" />
            <add Name="_definitionName" />
            <add Name="_definitionNameEmpty" />
      <add Name="deleted" />
    </IndexUserFields>
  </IndexSet>

Solution

  • You should be able to examine the indexes using LUKE https://code.google.com/archive/p/luke/

    You will need to add the document type at the bottom of the index as well

    <IndexSet SetName="UserIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/User/">
       <IndexUserFields>
            << Your nodes here >>
       </IndexUserFields>
       <IncludeNodeTypes>
          <add Name="<< Document Type name >>" />
       </IncludeNodeTypes>
    </IndexSet>
    

    Stop your website in IIS, delete the exsisting indexes and reboot the website. This should populate the index with data