-->
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: Batch update
PostPosted: Sun Sep 04, 2011 5:15 pm 
Newbie

Joined: Fri Apr 08, 2011 6:24 am
Posts: 9
Hi, I have a questione about batch update and Hibernate Search. When I have many entities (for example big list of objects, List<something>) I should save each entity separately in loop ("Batch updates" in doc), or I could do something else which would be more efficient?


Top
 Profile  
 
 Post subject: Re: Batch update
PostPosted: Sun Sep 04, 2011 5:54 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
if you can do all changes in a single transaction, that will be the most efficient operation: all operations will be queued in memory to be applied efficiently at commit time.
If the operations are too many though you might need to use org.hibernate.search.FullTextSession.flushToIndexes() to periodically flush this queue, or it might not fit in memory.

_________________
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.