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();
|