lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "De Simone, Alessandro" <Alessandro.DeSim...@bvdinfo.com>
Subject Custom files
Date Mon, 10 Oct 2011 07:57:58 GMT
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-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message