-->
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: mass indexer does not clean files?
PostPosted: Wed Dec 07, 2011 12:29 pm 
Beginner
Beginner

Joined: Sun Sep 18, 2011 4:44 pm
Posts: 22
It seems that the mass indexer (org.hibernate.search.MassIndexer, Hibernate Search 4.0.0.CR2) does not clean existing index files when invoked.
I observed that if I remove a @Field annotation of a property and run the indexer again, in Luke the field is still present after reopening the index.
Only if I remove the old index files before mass indexing, the field is removed from the index.
Is this normal? I don't know Luke well, but I guess it has no cache or similar.

Thanks


Top
 Profile  
 
 Post subject: Re: mass indexer does not clean files?
PostPosted: Wed Dec 07, 2011 1:06 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
The Field definition will still exist, but you should not have any instance of it. Could you try searching for documents containing such a field?

The MassIndexer does not physically delete the index files, it just deletes all instances of reindexed entities. Having some leftover unused fields has no bad effect on performance (assuming they are reasonably limited).
Deleting the Index would be harder; we would have to deal with cleanup of File descriptors, concurrent Search operations would fail badly, IndexReader pools need a restart.. and finally you might not want to delete+reindex all your entities but only a specific type.

I guess that @Field deletion will happen much more frequently on developer machines than production environments.. feel free to delete your whole index directory in such case to start fresh.

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