-->
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: [Hibernate Search] Reindexing collections
PostPosted: Fri Nov 09, 2007 6:43 pm 
Newbie

Joined: Tue Aug 21, 2007 5:57 pm
Posts: 7
I'd like to use Hibernate Search to index a collection, but the documentation warns that support is only partially implemented, pointing to:
http://opensource.atlassian.com/project ... HSEARCH-56

That page states that collections are not automatically reindexed on updates and that "the workaround is to touch the owning entity or manually call fullTextSession.index(owningEntity);"

Does anyone know what qualifies as touching the owning entity?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 7:03 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
it means changing the state of the owning entity

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 7:24 pm 
Newbie

Joined: Tue Aug 21, 2007 5:57 pm
Posts: 7
I'm guessing that state represented in collections doesn't qualify. Can it be touched by changing fields to different Strings of the same value? What about changing an entity and changing it back within the same session?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 8:23 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
no Hibernate is "too smart" to be fooled by a change back and forth

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 8:23 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
unless you flush() in between, but it's probably better to use the second workaround

_________________
Emmanuel


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.