-->
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.  [ 5 posts ] 
Author Message
 Post subject: MassIndexer - LazyInitializationException
PostPosted: Fri Feb 18, 2011 7:34 pm 
Beginner
Beginner

Joined: Fri Feb 18, 2011 7:30 pm
Posts: 41
I am using Hibernate Search 3.3.0.Final and trying to optimize my indexing step.

The issue I am having right now is that, the root element I am indexing say A, has lots of lazy loaded collections like 20.

When I kick off the indexer, I always get a LazyInitializationException on the collections.

If I make them eager, then the issue goes away, but ideally, I don't want to fetch them eagerly. I'll much rather prefer they remain lazily fetched.

The alternative is to crawl through in a loop and index using fullTextSession.index(T), but that is really really slow as I have upwards of 3million records.

Is this a known issue with MassIndexer? Or is there away to get around this? I have read the forums and tried all the suggestions I have seen including trying to run it on a single thread like

fullTextSession.createIndexer(A.class)
.batchSizeToLoadObjects(30)
.threadsForSubsequentFetching(1)
.threadsToLoadObjects(1)

to no avail.

Any help will be greatly appreciated.


Top
 Profile  
 
 Post subject: Re: MassIndexer - LazyInitializationException
PostPosted: Fri Feb 18, 2011 8:54 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
please don't double-post, I won't answer earlier.

I will need more information.
could you show at least the stacktrace?
a working unit test will get my full attention.

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


Top
 Profile  
 
 Post subject: Re: MassIndexer - LazyInitializationException
PostPosted: Fri Feb 18, 2011 9:24 pm 
Beginner
Beginner

Joined: Fri Feb 18, 2011 7:30 pm
Posts: 41
Sorry for double posting. I thought it might be better to stick it in the forum for the same reasons you outlined in your email. I'll get you a stacktrace and unit test once I am able to. Thanks for your quick response.


Top
 Profile  
 
 Post subject: Re: MassIndexer - LazyInitializationException
PostPosted: Sun Feb 20, 2011 6:33 am 
Beginner
Beginner

Joined: Fri Feb 18, 2011 7:30 pm
Posts: 41
Sanne - Sorry for the late response. I wanted to have a clear understanding of what the issue was before posting again. I think I have pretty much narrowed it down. I have raised a JIRA issue @ http://opensource.atlassian.com/project ... SEARCH-689 along with a test case to easily reproduce the problem.

Please don't hesitate to contact me for any further details I can provide.

Thanks


Top
 Profile  
 
 Post subject: Re: MassIndexer - LazyInitializationException
PostPosted: Sun Feb 20, 2011 3:19 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
thank you. Let's continue the discussion on JIRA.

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