hi all,
i'm having some trouble configuring the hibernate search.
i know i have to set these properties:
Code:
<property name="hibernate.search.default.directory_provider"
value="org.hibernate.search.store.FSDirectoryProvider"/>
<property name="hibernate.search.default.indexBase" value="c:/temp/indexes"/>
question is: on which instance or object?
it's an existing project and there's no sessionmanagerfactory, which is where i'm used to setting them.
this is the spring config. as you can see there's just the entitymanagerfactorybean.
Code:
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/repository" />
<property name="username" value="thatsnotmyname" />
<property name="password" value="yep" />
</bean>
<!-- The Entity Manager -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter">
<bean
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
<property name="database" value="MYSQL" />
<property name="databasePlatform" value="org.hibernate.dialect.MySQL5InnoDBDialect" />
<property name="showSql" value="true" />
<property name="generateDdl" value="true" />
</bean>
</property>
<property name="hibernate.search.default.directory_provider"
value="org.hibernate.search.store.FSDirectoryProvider"/>
<property name="hibernate.search.default.indexBase" value="c:/temp/indexes"/>
</bean>
<!-- The Transaction Manager -->
<bean id="transactionManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory"
ref="entityManagerFactory" />
<property name="dataSource" ref="dataSource" />
</bean>
<tx:annotation-driven transaction-manager="transactionManager"/>
<!-- The DAOs -->
<bean id="userDao"
class="org.mycompany.myproject.dao.impl.JpaUserDao">
<property name="entityManagerFactory"
ref="entityManagerFactory" />
</bean>