I have had some badly behaved Lucene indexing software crash on me several times and have been left with an index directory with lots of non-composite files in, when all I ought to be getting is the compound files .cfs files plus deletable and segments.
Re-indexing everything doesn't bear thinking about. I was wondering if I'd be able to merge these non-compound files into the composite index, and if so... how? [I appreciate that there is some risk in doing this, bearing in mind software crashed when the orphaned index files were created.] If you'll excuse the Perl gibber, this gives a sense of what's in the index directory: $ find . | perl -n -e 'if (/\..+.(\..+)/) {print "$1\n"}' | sort | uniq -c 15 .cfs 4 .f0 40 .fdt 36 .fdx 40 .fnm 16 .frq 1 .log 16 .prx 15 .tii 16 .tis 5 .tmp Here's my thinking: (1) I stop my indexer (2) I create a temp directory and move everything other than the .cfs files, deletable and segments into it (3) I open an IndexWriter to my composite index and use IndexWriter.addIndexes(Directory[]) on the temp directory Assuming the files aren't corrupt, should that do the job to create a nicely merged composite index, or is this a foolish undertaking?
smime.p7s
Description: S/MIME cryptographic signature