Hello,

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. _0.map, 
_1.map ...) and it works!
I also created a custom IndexWriter to override the mergeSuccess method :  I 
create a new custom file using the merge.info.name 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 ?

Thanks,

Alessandro De Simone

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to