title: Beginner hibernate / spring / hiberante-search question (Configuration)
body: <p>I am sure this is a fairly simple question but I can't seem to phrase it in a way google can help.</p>
  
  <p>In the hibernate-search docs there is a programmatic API (http://docs.jboss.org/hibernate/search/3.2/reference/en-US/html/search-mapping.html#hsearch-mapping-programmaticapi),</p>
  
  <p>I am trying to create a search mapping as per :
  Code:
  SearchMapping mapping = new SearchMapping();
  [...]
  configuration.setProperty( Environment.MODEL_MAPPING, mapping );</p>
  
  <p>But I dont really understand what the configuration object is and how i would obtain it. I am using spring and the org.springframework.orm.hibernate3.support.HibernateDaoSupport package for my DAO so is it something I need to inject somehow in the form of a bean? I will pop this on a spring forum as well as it might be more spring related.</p>
  
  <p>Any help and suggestions would be much appreciated.</p>
  
  <p>Spring setup is here is it is useful, if other code would help just let me know
  Code:
     
        </p>
  
  <pre><code>     &lt;property name="annotatedClasses"&gt;
          &lt;list&gt;
  
            &lt;value&gt;com.ActivityGB.client.domain.Provider&lt;/value&gt;
            &lt;value&gt;com.ActivityGB.client.domain.Activity&lt;/value&gt;
            &lt;value&gt;com.ActivityGB.client.domain.Location&lt;/value&gt;
            &lt;value&gt;com.ActivityGB.client.domain.Address&lt;/value&gt;
            &lt;value&gt;com.ActivityGB.client.domain.Category&lt;/value&gt;
          &lt;/list&gt;
  
     &lt;/property&gt;
  
    &lt;property name="mappingResources"&gt;
  
       &lt;list&gt;
  
          &lt;value&gt;com/ActivityGB/client/domain/Provider.hbm.xml&lt;/value&gt;
          ....
          &lt;value&gt;com/ActivityGB/client/domain/UserWall.hbm.xml&lt;/value&gt;
  
  
  
       &lt;/list&gt;
    &lt;/property&gt;
    &lt;property name="hibernateProperties"&gt;
       &lt;props&gt;
          &lt;prop key="hibernate.bytecode.provider"&gt;cglib&lt;/prop&gt;
          &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.MySQLDialect&lt;/prop&gt;
          &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
          &lt;prop key="hibernate.format_sql"&gt;true&lt;/prop&gt;
          &lt;!-- &lt;prop key="hibernate.use_sql_comments"&gt;true&lt;/prop&gt; --&gt;
          &lt;prop key="hibernate.bytecode.use_reflection_optimizer"&gt;true&lt;/prop&gt;
          &lt;prop key="hibernate.jdbc.batch_size"&gt;20&lt;/prop&gt;
  
          &lt;prop key="hibernate.c3p0.min_size"&gt;10&lt;/prop&gt;
          &lt;prop key="hibernate.c3p0.max_size"&gt;100&lt;/prop&gt;
          &lt;prop key="hibernate.c3p0.timeout"&gt;10&lt;/prop&gt;
          &lt;prop key="hibernate.c3p0.acquireRetryAttempts"&gt;30&lt;/prop&gt;
  
          &lt;prop key="hibernate.c3p0.acquireIncrement"&gt;5&lt;/prop&gt;
  
          &lt;prop key="hibernate.c3p0.idleConnectionTestPeriod"&gt;100&lt;/prop&gt;
  
          &lt;prop key="hibernate.c3p0.initialPoolSize"&gt;20&lt;/prop&gt;
          &lt;prop key="hibernate.c3p0.maxPoolSize"&gt;100&lt;/prop&gt;
          &lt;prop key="hibernate.c3p0.maxIdleTime"&gt;300&lt;/prop&gt;
          &lt;prop key="hibernate.c3p0.maxStatements"&gt;50&lt;/prop&gt;
          &lt;prop key="hibernate.c3p0.minPoolSize"&gt;10&lt;/prop&gt;
  
          &lt;prop key="hibernate.c3p0.preferredTestQuery"&gt;SELECT 1&lt;/prop&gt;
  
  
          &lt;prop key="hibernate.c3p0.testConnectionOnCheckout"&gt;true&lt;/prop&gt;
          &lt;prop key="show_sql"&gt;true&lt;/prop&gt;
  
          &lt;prop key="hibernate.search.default.directory_provider"&gt;org.hibernate.search.store.FSDirectoryProvider&lt;/prop&gt;
  
          &lt;prop key="hibernate.search.default.indexBase"&gt;d:\luceneFinal\&lt;/prop&gt;
       &lt;/props&gt;
    &lt;/property&gt;
  </code></pre>
  
  <p></p>