[ https://issues.apache.org/jira/browse/LUCENE-4884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13614350#comment-13614350 ]
Shai Erera commented on LUCENE-4884: ------------------------------------ bq. I think for this issue we should just add DirectoryTaxonomyWriter.deleteAll The taxonomy index is a special index with specific structure (e.g. it has the ROOT document, at doc=0). DTW.deleteAll() makes no sense, even if we try to implement it properly (by e.g. adding back doc=0). Rather, either open a DTW with OpenMode.CREATE, or do something like this: {code} Directory emptyTaxoDir = new RAMDirectory(); new DirTaxoWriter(emptyTaxoDir).close(); oldTaxoIndex.replaceTaxonomy(emptyTaxoDir); {code} I know that DirTaxoWriter.deleteAll() would have been simpler to the app, but I prefer that we don't expose it. > deleteAll() does not remove all TaxonomyWriter files > ---------------------------------------------------- > > Key: LUCENE-4884 > URL: https://issues.apache.org/jira/browse/LUCENE-4884 > Project: Lucene - Core > Issue Type: Bug > Components: core/index > Affects Versions: 4.2 > Reporter: Rob Audenaerde > Priority: Minor > > When calling deleteAll() on the IndexWriter, the documents are removed from > the index and from the taxonomy. When investigating what is happing after the > deleteAll() on the disk, I see that in the index-directory I end up with just > two files: > Index-directory: > * segments.gen > * segments_2 > Taxonomy directory: > * segments.gen > * segments_h > BUT also a lot of 'older' files, like > * _1_Lucene41_0.tip > * _1_Lucene41_0.tim > etc. > It seems these files are never deleted. If you index a lot and call deleteAll > a lot, it will fill up your disk. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org