-->
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: How to rebuild lucene index w/ annotations + event listener?
PostPosted: Wed Sep 13, 2006 5:45 pm 
Newbie

Joined: Wed Mar 08, 2006 10:33 pm
Posts: 16
Location: Brazil
I am using Annotiations and the LuceneEventListener to automatically build a search index as new objects are inserted.

Sometimes, the lucene index will have to be rebuilt.

So...
1. I recreate the index-dir with the Lucene IndexWriter (deletes existing index)

2. I iterate through the annotated domain objects

3. During the iteration, I *want* to fire the event listener as configured for the event-type: "post-commit-insert"
Is there a way to force this event to be fired, though I am not really performing an insert operation?

Thanks,
Stan


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 15, 2006 9:18 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Hi,
http://anonsvn.jboss.org/repos/hibernate/branches/Lucene_Integration/

has a prototype on future hibernate / lucene integration. I can't remember if I did integrate the feature you want, I think so. Feedback welcome

_________________
Emmanuel


Top
 Profile  
 
 Post subject: prototype in repository?
PostPosted: Sat Sep 16, 2006 9:46 am 
Newbie

Joined: Wed Mar 08, 2006 10:33 pm
Posts: 16
Location: Brazil
Thanks... but I couldn't find the prototype in the repostitory (referred to by the hyperlink you gave me).

Anyway, I have a temporary workaround -- added a document-update-count fileld to my ejb/table . I recreate the index and increment this column value in every relevant domain instance-- forcing an update event on the LuceneIndexListener. This rebuilds the entire index.

Is is a hack, but it works until the Annotations framework will work with Hibernate RC4 (with all the new work done on the lucene integration). I'm sure I"ll find a better solution at that time.

By the way... any ETA (he asks very, very nicely) on when the Annotations and EntityManager frwks will be able to work with Hibernate RC3/RC4?

Thanks again..
Stan


Top
 Profile  
 
 Post subject: Re: prototype in repository?
PostPosted: Sat Sep 16, 2006 5:12 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
exitstan wrote:
By the way... any ETA (he asks very, very nicely) on when the Annotations and EntityManager frwks will be able to work with Hibernate RC3/RC4?


10 minutes ago

_________________
Emmanuel


Top
 Profile  
 
 Post subject: Hibernate RC4 compatible annotations and entity-mgr fwks
PostPosted: Sat Sep 16, 2006 5:41 pm 
Newbie

Joined: Wed Mar 08, 2006 10:33 pm
Posts: 16
Location: Brazil
That was fast! Muito Obrigado.
-Stan


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.