-->
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: Susbcribe to MassIndexer completion
PostPosted: Wed Jun 01, 2011 10:45 am 
Pro
Pro

Joined: Wed Nov 05, 2003 7:22 pm
Posts: 211
Hi,

Is it possible to subscribe to the MassIndexer completion event? If you choose the non-blocking operation, you have no way of knowing when it has completed.
If you choose blocking, you may run into stuff like front end webserver timeouts etc.

It is useful for things like cache refreshing and, since the filter option isn't there yet: removing stuff from the index that shouldn't be there.

Kind regards,

Marc


Top
 Profile  
 
 Post subject: Re: Susbcribe to MassIndexer completion
PostPosted: Wed Jun 01, 2011 9:17 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi Marc,
yes you can do that making use of the MassIndexerProgressMonitor interface, see also

Code:
/**
* Override the default <code>MassIndexerProgressMonitor</code>.
*
* @param monitor this instance will receive updates about the massindexing progress.
* @return <tt>this</tt> for method chaining
*/
org.hibernate.search.MassIndexer.progressMonitor(MassIndexerProgressMonitor)


You could extend org.hibernate.search.impl.SimpleIndexingProgressMonitor and override the method indexingCompleted() (or just implement your own MassIndexerProgressMonitor)

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