title: Custom search configuration in sitecore 7
body: <p>I have been working on the sitecore contentSearch API recently.When i try to build the custom Index,I'm getting the runtime errors as follows.</p>
  
  <pre><code>Could not find property 'initializeOnAdd' on object of type: Sitecore.ContentSearch.LuceneProvider.LuceneIndexConfiguration
  </code></pre>
  
  <p>This is my sample configuration.</p>
  
  <pre><code>&lt;configuration xmlns:patch="http://www.sitecore.net/xmlconfig/"&gt;
    &lt;sitecore&gt;
      &lt;contentSearch&gt;
        &lt;configuration type="Sitecore.ContentSearch.LuceneProvider.LuceneSearchConfiguration, Sitecore.ContentSearch.LuceneProvider"&gt;
          &lt;indexes hint="list:AddIndex"&gt;
            &lt;index id="demo_master" type="Sitecore.ContentSearch.LuceneProvider.LuceneIndex, Sitecore.ContentSearch.LuceneProvider"&gt;
              &lt;param desc="name"&gt;$(id)&lt;/param&gt;
              &lt;param desc="folder"&gt;$(id)&lt;/param&gt;
              &lt;!-- This initializes index property store. Id has to be set to the index id --&gt;
              &lt;param desc="propertyStore" ref="contentSearch/databasePropertyStore" param1="$(id)" /&gt;
              &lt;configuration ref="contentSearch/indexConfigurations/LuceneCustomSearchConfiguration" /&gt;
              &lt;strategies hint="list:AddStrategy"&gt;
                &lt;!-- NOTE: order of these is controls the execution order --&gt;
                &lt;strategy ref="contentSearch/indexUpdateStrategies/syncMaster" /&gt;
              &lt;/strategies&gt;
              &lt;commitPolicyExecutor type="Sitecore.ContentSearch.CommitPolicyExecutor, Sitecore.ContentSearch"&gt;
                &lt;policies hint="list:AddCommitPolicy"&gt;
                  &lt;policy type="Sitecore.ContentSearch.TimeIntervalCommitPolicy, Sitecore.ContentSearch" /&gt;
                &lt;/policies&gt;
              &lt;/commitPolicyExecutor&gt;
              &lt;locations hint="list:AddCrawler"&gt;
                &lt;crawler type="Sitecore.ContentSearch.SitecoreItemCrawler, Sitecore.ContentSearch"&gt;
                  &lt;Database&gt;master&lt;/Database&gt;
                  &lt;Root&gt;/sitecore/content/Sample&lt;/Root&gt;
                &lt;/crawler&gt;
              &lt;/locations&gt;
            &lt;/index&gt;
          &lt;/indexes&gt;
        &lt;/configuration&gt;
        &lt;indexConfigurations&gt;
          &lt;LuceneCustomSearchConfiguration type="Sitecore.ContentSearch.LuceneProvider.LuceneIndexConfiguration, Sitecore.ContentSearch.LuceneProvider"&gt;
            &lt;indexAllFields&gt;true&lt;/indexAllFields&gt;
            &lt;initializeOnAdd&gt;true&lt;/initializeOnAdd&gt;
            &lt;analyzer ref="contentSearch/configuration/defaultIndexConfiguration/analyzer" /&gt;
            &lt;fieldMap type="Sitecore.ContentSearch.FieldMap, Sitecore.ContentSearch"&gt;
              &lt;fieldNames hint="raw:AddFieldByFieldName"&gt;
                &lt;field fieldName="_uniqueid"            storageType="YES" indexType="TOKENIZED"    vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider"&gt;
                  &lt;analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" /&gt;
                &lt;/field&gt;
                &lt;field fieldName="Name"  storageType="YES" indexType="TOKENIZED"    vectorType="NO" boost="1f" type="System.String" settingType="Sitecore.ContentSearch.LuceneProvider.LuceneSearchFieldConfiguration, Sitecore.ContentSearch.LuceneProvider"&gt;
                  &lt;analyzer type="Sitecore.ContentSearch.LuceneProvider.Analyzers.LowerCaseKeywordAnalyzer, Sitecore.ContentSearch.LuceneProvider" /&gt;
                &lt;/field&gt;
                &lt;/fieldNames&gt;
            &lt;/fieldMap&gt;
            &lt;fields hint="raw:AddComputedIndexField"&gt;
              &lt;field fieldName="imageurl"&gt;Lucene.CustomSearch.BusinessLayer.ComputedFields.ImageUrlComputedField,Lucene.CustomSearch.BusinessLayer&lt;/field&gt;
              &lt;field fieldName="releaseyear"&gt;Lucene.CustomSearch.BusinessLayer.ComputedFields.YearComputedField,Lucene.CustomSearch.BusinessLayer&lt;/field&gt;
              &lt;/fields&gt;
            &lt;include hint="list:IncludeTemplate"&gt;
              &lt;Laptop&gt;{3AF80D80-404F-411F-9E72-F43A7D92AEC8}&lt;/Laptop&gt;
            &lt;/include&gt;
            &lt;fieldReaders ref="contentSearch/configuration/defaultIndexConfiguration/fieldReaders"/&gt;
            &lt;indexFieldStorageValueFormatter ref="contentSearch/configuration/defaultIndexConfiguration/indexFieldStorageValueFormatter"/&gt;
            &lt;indexDocumentPropertyMapper ref="contentSearch/configuration/defaultIndexConfiguration/indexDocumentPropertyMapper"/&gt;
          &lt;/LuceneCustomSearchConfiguration&gt;
        &lt;/indexConfigurations&gt;
      &lt;/contentSearch&gt;
    &lt;/sitecore&gt;
  &lt;/configuration&gt;
  </code></pre>
  
  <p>I had a look at sitecore's search configuration file and do some changes on it.Type &amp; analyzer settings.am i missing anything in configuration?</p>