-->
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.  [ 3 posts ] 
Author Message
 Post subject: Hibernate Search indexing question
PostPosted: Fri Sep 07, 2007 12:13 pm 
Beginner
Beginner

Joined: Wed Oct 15, 2003 1:31 pm
Posts: 25
I'm using Hibernate Search 3.0.0Beta4 with matching versions of Hibernate Annotations and EntityManager, with Glassfish v2rc6.

In my application I do a bulk update via EJB 3.0 JPA, updating a table whose objects are indexed by Hibernate Search. When I to a Hibernate Search query for the updated objects, I get the pre-updated values. I use @Field(index = org.hibernate.search.annotations.Index.UN_TOKENIZED, store = Store.YES) to store these values in the full text index.

I assume that this is correct operation for Hibernate Search (although I hadn't considered this beforehand). I just wanted someone who knows this well to confirm that there is indeed no way to get Hibernate Search to index changes to objects when doing a bulk update, (i.e. UPDATE User u SET u.firstName = "jo")

If there is some way to do this, it will save me some extra work. Much appreciate the guidance.

Cheers,

_________________
Rick Horowitz
---------
Please remember to rate...


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 07, 2007 12:58 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
There is no automatic way since bilk operations are database only.
However, if you know the objects ids your bulk operation targets, you can use ftSession.index() to reindex the objects that have been updated behind Hibernate's back.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 07, 2007 3:26 pm 
Beginner
Beginner

Joined: Wed Oct 15, 2003 1:31 pm
Posts: 25
Emmanuel,

Thanks. That's about what I thought. I very much appreciate the quick reply.

_________________
Rick Horowitz
---------
Please remember to rate...


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.