-->
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: Hibernate Search (update/delete event bugs)
PostPosted: Sun Apr 01, 2007 10:47 am 
Newbie

Joined: Wed Mar 08, 2006 10:33 pm
Posts: 16
Location: Brazil
I know this is a work in progress, but I've already committed my self to using this framework and have found workarounds to all problems so far.
After attempting to migrate to Hibernate Search v3beta1 and not seeing some problems resolved, I decided to post this forum topic.

I may have found 2 bugs in these implementations of Hibernate Search.

A. Hibernate Search v3.0.0 beta1
B. Hibernate Search support in hibernate-annotations-3.2.1.GA

The first problem:

If I configure a post-update lucene event listener, Hibernate Search will insert a new index entry -- a duplicate -- when I update a column. This causes duplicates in search results that include any updated domain instance.

The second problem:

When I delete a domain object, the lucene index entry is not deleted, and no exception is thrown.

I am using Spring JPA + Hibernate Entity Mgr. In this setup, Hibernate Search always correctly inserts a new lucene document for every newly persisted domain instance. The post-insert event works perfectly.

However, since deletion does not work (the second problem), I must(?) use the lucene API to delete the document, without the benefit of Hibernate Search's transaction support. It would be really nice to get rid of this work around, and be able to delete lucene documents w/out resorting to the lucene API.

I assume that most people using Hibernate Search use the Hibernate entity-mgrs and native sessions, not Spring JPA. But it "almost" works for me.

Are these problems known to any of the Hibernate Search developers / users?

Thanks,
Stan


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 12, 2007 4:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Can you detail your configuration ie your configurations files.

the first problem might be a double event listener registration. The correct way is to not declare the event listeners if you use Annotations or EntityManager 3.3.0

The second problem is really weird, can you check (debugger) which event listeners are registered?
you can find them using ((SessionImplementor)session).getListeners()

Thanks for the report.

_________________
Emmanuel


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.