Hello,
We have a technical issue with our usage of lucene that let us puzzle about the
possible source.
To specified the issue, we have an application with good time of response on
search but after a certain amount of time from a few hours to a few days the
search that were taking a few hundreds milisecond start to take more than ten
second.
We have no error in our log, and are unable to find any differences between the
two states.
Technicaly :
We have a first server on jboss application server that perform the indexation
throught hibernate search and perform query directly using Lucene.
We have a second server perfoming only search throught lucene in read only mode
and that point to same directory.
We use SearchManager to acquire the IndexSearcher.
Test :
When the first server begin to be slow the following line in our code takes
more 10s also.
new SearcherManager(NIOFSDirectory.open(new File(folder), new NoLockFactory()),
new SearcherFactory());
Version
Jboss : 7.1.x
Lucene : 3.6.2
Hibernate Search : 4.2.0.
Configuration :
Application context serveur for both :
<property name="hibernateProperties">
<props>
<prop
key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
<prop key="hibernate.max_fetch_depth">1</prop>
<prop key="hibernate.show_sql">false</prop>
<prop key="hibernate.cache.use_query_cache">false</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop
key="net.sf.ehcache.configurationResourceName">/ehcache-entity.xml</prop>
<prop
key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory</prop>
<prop
key="javax.persistence.sharedCache.mode">DISABLE_SELECTIVE</prop>
<prop
key="hibernate.search.default.directory_provider">filesystem</prop>
<prop
key="hibernate.search.default.indexBase">/home/Jboss/xxx/lucene</prop>
<prop
key="hibernate.ejb.event.post-insert">org.hibernate.search.event.FullTextIndexEventListener</prop>
<prop
key="hibernate.ejb.event.post-update">org.hibernate.search.event.FullTextIndexEventListener</prop>
<prop
key="hibernate.ejb.event.post-delete">org.hibernate.search.event.FullTextIndexEventListener</prop>
</props>
</property>
Regards,
Yannick Gérault