org.cdlib.xtf.textIndexer
Class IndexMerge

Object
  extended by IndexMerge

public class IndexMerge
extends Object

This class merges the contents of two or more XTF indexes, with certain caveats.

Author:
Martin Haye

Nested Class Summary
private static class IndexMerge.DirInfo
           
 
Constructor Summary
IndexMerge()
           
 
Method Summary
private static void doMerge(IndexMerge.DirInfo[] dirInfos, boolean createTarget)
          Merge a bunch of indexes together.
static void main(String[] args)
          Main entry-point for the index merger.
private static void mergeAux(IndexMerge.DirInfo[] dirInfos)
           
private static void mergeLazy(File src, File dst)
           
private static void mergeLazy(IndexMerge.DirInfo[] dirInfos)
           
private static void mergeLucene(IndexWriter writer, IndexMerge.DirInfo[] dirInfos)
           
private static void mergeSpelling(IndexMerge.DirInfo[] dirInfos)
           
private static void mergeTokFldFiles(File file1, File file2)
           
private static IndexMerge.DirInfo readInfo(String path, Directory dir)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexMerge

public IndexMerge()
Method Detail

main

public static void main(String[] args)
Main entry-point for the index merger.

This function takes the command line arguments passed and uses them to find the indexes and merge them.


readInfo

private static IndexMerge.DirInfo readInfo(String path,
                                           Directory dir)
                                    throws IOException
Throws:
IOException

doMerge

private static void doMerge(IndexMerge.DirInfo[] dirInfos,
                            boolean createTarget)
                     throws InterruptedException,
                            IOException
Merge a bunch of indexes together.

Throws:
InterruptedException
IOException

mergeSpelling

private static void mergeSpelling(IndexMerge.DirInfo[] dirInfos)
                           throws IOException
Throws:
IOException

mergeAux

private static void mergeAux(IndexMerge.DirInfo[] dirInfos)
                      throws IOException
Throws:
IOException

mergeTokFldFiles

private static void mergeTokFldFiles(File file1,
                                     File file2)
                              throws IOException
Throws:
IOException

mergeLazy

private static void mergeLazy(IndexMerge.DirInfo[] dirInfos)
                       throws IOException
Throws:
IOException

mergeLazy

private static void mergeLazy(File src,
                              File dst)
                       throws IOException
Throws:
IOException

mergeLucene

private static void mergeLucene(IndexWriter writer,
                                IndexMerge.DirInfo[] dirInfos)
                         throws IOException
Throws:
IOException