-->
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 3.4: How to manually update an Index?
PostPosted: Mon Aug 08, 2011 3:08 pm 
Regular
Regular

Joined: Tue May 17, 2011 1:45 am
Posts: 52
Hi ,

Might seem a trivial question but I have been struggling to get this working. The following is the code snippet I use for updating the index. There is a object SomeClassObject that has changed and needs to be updated in the Index. So I first purge that class from index and then use fullTextSession.index() to create an index of the updated object. When I refer my lucene index I can see that the object has been removed which means purging is working fine, but for some reasons update is not happening. Any pointers will be helpful.

fullTextSession.purge(SomeClass.class,someID);
fullTextSession.index(SomeClassObject);
fullTextSession.getSearchFactory().optimize();


Top
 Profile  
 
 Post subject: Re: Hibernate Search 3.4: How to manually update an Index?
PostPosted: Mon Aug 08, 2011 6:04 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
strange.
What happens if you use flushToIndexes() between the purge() and the index() ?
Is this entity mapped with some non-trivial annotations?

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