Re: how to backup lucene index file

2016-01-13 Thread Shai Erera
You should use Lucene's replicator module, which helps you take backups from live snapshots of your index, even while indexing happens. You can read about how to use it here: http://shaierera.blogspot.co.il/2013/05/the-replicator.html Shai On Wed, Jan 13, 2016, 19:14 Erick Erickson wrote: > Jus

Re: how to backup lucene index file

2016-01-13 Thread Erick Erickson
Just copy the index directory, it's self contained. I'd make sure I wasn't actively indexing to it and I'd committed all my indexing first, but that's all. On Wed, Jan 13, 2016 at 8:33 AM, 鞠朕 wrote: > Hi,I am using Lucene to build a Full Text search system, I put the index > file in some Dir

how to backup lucene index file

2016-01-13 Thread 鞠朕
Hi,I am using Lucene to build a Full Text search system, I put the index file in some Directory in my server, Considering robust, I think i shouldbackup the index file in somewhere else. If the index file is broken, i can switch to the backup one.Can you tell me how to do this, use what

Re: IndexWriter.addIndexes with LeafReader parameter

2016-01-13 Thread Christoph Kaser
You could try using the org.apache.lucene.index.SlowCodecReader to wrap your index reader: SlowCodecReaderWrapper.wrap(indexReader) returns a CodecReader from an index reader. Regards Christoph Am 13.01.2016 um 09:09 schrieb Manner Róbert: Unfortunately I can not use that, because I do not wa

Re: IndexWriter.addIndexes with LeafReader parameter

2016-01-13 Thread Manner Róbert
Unfortunately I can not use that, because I do not want to copy all the indexes. Our use case is "archiving" of indexes: we would like to copy to separate file (and remove) part of the indexes, for example which are more than a month old. We achieved it by writing a Reader which does the filtering,