Class IndexSplitter


  • public class IndexSplitter
    extends java.lang.Object
    Command-line tool that enables listing segments in an index, copying specific segments to another index, and deleting segments from an index.

    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.

    • Constructor Summary

      Constructors 
      Constructor Description
      IndexSplitter​(java.io.File dir)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • IndexSplitter

        public IndexSplitter​(java.io.File dir)
                      throws java.io.IOException
        Throws:
        java.io.IOException
    • Method Detail

      • main

        public static void main​(java.lang.String[] args)
                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • listSegments

        public void listSegments()
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • remove

        public void remove​(java.lang.String[] segs)
                    throws java.io.IOException
        Throws:
        java.io.IOException
      • split

        public void split​(java.io.File destDir,
                          java.lang.String[] segs)
                   throws java.io.IOException
        Throws:
        java.io.IOException