public class IndexSplitter
extends java.lang.Object
This tool does file-level copying of segments files. This means it's unable to split apart a single segment into multiple segments. For example if your index is a single segment, this tool won't help. Also, it does basic file-level copying (using simple File{In,Out}putStream) so it will not work with non FSDirectory Directory impls.
NOTE: this tool is unaware of documents added
atomically via IndexWriter.addDocuments(java.util.Collection<org.apache.lucene.document.Document>) or IndexWriter.updateDocuments(org.apache.lucene.index.Term, java.util.Collection<org.apache.lucene.document.Document>), which means it can easily
break up such document groups.
| Modifier and Type | Field and Description |
|---|---|
org.apache.lucene.index.SegmentInfos |
infos |
| Constructor and Description |
|---|
IndexSplitter(java.io.File dir) |
| Modifier and Type | Method and Description |
|---|---|
void |
listSegments() |
static void |
main(java.lang.String[] args) |
void |
remove(java.lang.String[] segs) |
void |
split(java.io.File destDir,
java.lang.String[] segs) |
public IndexSplitter(java.io.File dir)
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
args - java.lang.Exceptionpublic void listSegments()
throws java.io.IOException
java.io.IOExceptionpublic void remove(java.lang.String[] segs)
throws java.io.IOException
java.io.IOExceptionpublic void split(java.io.File destDir,
java.lang.String[] segs)
throws java.io.IOException
java.io.IOExceptionCopyright © 2000-2022 Apache Software Foundation. All Rights Reserved.