lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "De Simone, Alessandro" <>
Subject Custom files
Date Mon, 10 Oct 2011 07:57:58 GMT

I'm using Lucene 3.4.0 and I would like to create a custom file with each segment file Lucene
creates (without modifying the source code).

I managed to create a custom indexing chain to create my file (e.g., ...) and
it works!
I also created a custom IndexWriter to override the mergeSuccess method :  I create a new
custom file using the variable.

But a problem remains : how and when can I cleanly delete the old non-used files ? I tried
to create a custom IndexDeletionPolicy (overriding KeepOnlyLastCommitDeletionPolicy) but testing
on commit.isDeleted() is not working because there is a RefCount on each segment files and
a deleted commit doesn't mean I can delete my files right away.

Another solution is to add my file in the SegmentInfo.files collection or adding my custom
extension to IndexFileNames.NON_STORE_INDEX_EXTENSIONS, but it seems there is no extension
point there.

Am I missing something ?


Alessandro De Simone

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message