-->
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.  [ 3 posts ] 
Author Message
 Post subject: hibernate.search.worker.batch_size and cluster ing
PostPosted: Mon Aug 11, 2008 8:00 pm 
Newbie

Joined: Wed Jul 09, 2008 8:55 pm
Posts: 9
Hi,
I have a question on worker.batch_size. If I set this to say 1000, and if i have automatic indexing to synch entity changes with index.

1. Does it mean that even though a particular entity is changed and committed to the database, the index update wont happen untill 1000 changes have accumulated?
2. Or is it, purely from a batch entity update or index perspective, where if we update or index 1000's at a time, index will be updated at every 1000 change accumulation. But, individual entity changes are reflected instantaneously in the lucene index?
3. The reason, I am asking this is: If I have multiple nodes of JBOSS/hibernate pointing to the same data(say oracle), will i have a problem where
node1 added an entity at time T1
node2 updated the entity at time T1 > T2
node1 deleted that entity at time T3 > T2

when node 2 batch size comes to a full 1000, the entity update will create a fake lucene index entry eventhough the entity should actually be deleted.

Sorry, if this is too confusing

thanks!!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 12, 2008 6:29 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

I think this few lines from the online doc should answer your question:
Quote:
To avoid that, you can set up the hibernate.search.worker.batch_size property to a sensitive value: all index operations are queued until batch_size is reached. Every time batch_size is reached (or if the transaction is committed), the queue is processed (freeing memory) and emptied. Be aware that the changes cannot be rollbacked if the number of index elements goes beyond batch_size. Be also aware that the queue limits are also applied on regular transparent indexing (and not only when session.index() is used). That's why a sensitive batch_size value is expected.


Does this answer your question?

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 12, 2008 2:33 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Please don't cross post on both forums, this makes us work twice for the same issue.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.