-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: how to close indexwriter (remove write.lock) after persist
PostPosted: Tue Nov 01, 2011 2:04 pm 
Beginner
Beginner

Joined: Sun Sep 18, 2011 4:44 pm
Posts: 22
A write.lock file is created after a call to EntityManager.persist.
How can I close the index writer and remove hereby the lock file after the call?

We have two applications which write infrequently to the same index.
My understanding is that the lock file is to prevent concurrent writing, ideal for this case.
If I set the timeout high enough, there should be no problem because persisting takes less than a second
and the writing is infrequent.
But after the first persist, the file stays until the application is shut down.

I tried to set hibernate.search.default.indexwriter.merge_factor=2, but doesn't help.

Thanks in advance!


Top
 Profile  
 
 Post subject: Re: how to close indexwriter (remove write.lock) after persist
PostPosted: Thu Nov 03, 2011 10:25 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
you need to disable exclusive_index_use, if you do the IndexWriter won't be pooled and will be closed after each operation.

This used to be false by default in version 3.x but is now set to true by default in versions 4.x

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.