-->
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: Reindex more than 1.200.000 records PROBLEM
PostPosted: Mon Jun 15, 2009 7:47 am 
Newbie

Joined: Thu Jun 11, 2009 11:34 am
Posts: 7
How i can reindex more than 1200000 records?

I have this:

[code ]
entries = entityManager.createQuery("select n from PolMensajes n").getResultList();
for (PolMensajes n : entries){
entityManager.index(n);
indexados++;
}
[/code]


I have increased virtual memory to perform the query. I understand that there are too many entries to store in memory. I saw that when reindex objects, first, extracted from the database, then executes the action entityManager.index(n), but in reality does not index until it passes some time, why not indexed at the same time that is the index() called? How do I index 1200000 records?

Sorry for my english ;)


Thanks in advance...


Top
 Profile  
 
 Post subject: Re: Reindex more than 1.200.000 records PROBLEM
PostPosted: Mon Jun 15, 2009 9:48 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Index updates occur per default at commit time. This ensures to a certain degree ACIDity. The recommended way of batch indexing is by manually controlling the transaction and using FullTextSession.flushToIndexes(). Have a look at the online documentation - http://docs.jboss.org/hibernate/stable/ ... x-indexing

--Hardy


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.