-->
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: Avoid automatic indexing with a class bridge
PostPosted: Wed Apr 15, 2009 5:16 am 
Newbie

Joined: Wed Apr 23, 2008 11:11 pm
Posts: 19
Hi,

We are using Hibernate Search 3.0.2 with Hibernate 3.2.6.

We have a class bridge on a class that is meant to gather 3 fields into a single lucene field.

We also have a specific workflow steps that basically crawls a lot of data and create/update existing instance of that class. During that process, none of those 3 fields are updated. For some reasons, a transaction is created to update every object during crawling

What we noticed is that a lot of time is spent in the lucene reindex process.

I have a couple of questions:

* Is there a way to control the document update using a class brige? (i.e. realize it is an update and none of the three fields have been updated so nothing should be done)
* Is there a way to disable automatic indexing per session so that the indexing can be done at the end of the crawling process?

Any other insight?

Thanks,
Stéphane


Top
 Profile  
 
 Post subject: Re: Avoid automatic indexing with a class bridge
PostPosted: Thu Apr 16, 2009 5:45 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Quote:
We also have a specific workflow steps that basically crawls a lot of data and create/update existing instance of that class. During that process, none of those 3 fields are updated. For some reasons, a transaction is created to update every object during crawling

I am not sure I understand completely what you are saying. Your crawler creates a transaction for each object? That does not sound really efficient. For batch indexing I recommend the FullTextSession.index() operation, but of course don't create a single transaction for each update.

Quote:
* Is there a way to control the document update using a class brige? (i.e. realize it is an update and none of the three fields have been updated so nothing should be done)

No, once the class bridge is called, Hibernate Search has already determined that there was an insert/update even for the entity. It cannot know that the properties relevant for the class bridge have not changed.

Quote:
* Is there a way to disable automatic indexing per session so that the indexing can be done at the end of the crawling process?

No. One option might be to have the crawler as separate application in which you would turn off autoindexing. But maybe you could explain first a little bit more about how this crawler works. Some code examples might be handy as well ;-)

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