org.apache.lucene.facet.example.merge
Class TaxonomyMergeUtils

java.lang.Object
  extended by org.apache.lucene.facet.example.merge.TaxonomyMergeUtils

public class TaxonomyMergeUtils
extends Object

WARNING: This API is experimental and might change in incompatible ways in the next release.

Constructor Summary
TaxonomyMergeUtils()
           
 
Method Summary
static void merge(org.apache.lucene.store.Directory srcIndexDir, org.apache.lucene.store.Directory srcTaxDir, org.apache.lucene.store.Directory destIndexDir, org.apache.lucene.store.Directory destTaxDir)
          Merges the given taxonomy and index directories.
static void merge(org.apache.lucene.store.Directory srcIndexDir, org.apache.lucene.store.Directory srcTaxDir, DirectoryTaxonomyWriter.OrdinalMap map, org.apache.lucene.index.IndexWriter destIndexWriter, DirectoryTaxonomyWriter destTaxWriter)
          Merges the given taxonomy and index directories and commits the changes to the given writers.
static void merge(org.apache.lucene.store.Directory srcIndexDir, org.apache.lucene.store.Directory srcTaxDir, org.apache.lucene.index.IndexWriter destIndexWriter, DirectoryTaxonomyWriter destTaxWriter)
          Merges the given taxonomy and index directories and commits the changes to the given writers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaxonomyMergeUtils

public TaxonomyMergeUtils()
Method Detail

merge

public static void merge(org.apache.lucene.store.Directory srcIndexDir,
                         org.apache.lucene.store.Directory srcTaxDir,
                         org.apache.lucene.store.Directory destIndexDir,
                         org.apache.lucene.store.Directory destTaxDir)
                  throws IOException
Merges the given taxonomy and index directories. Note that this method opens DirectoryTaxonomyWriter and IndexWriter on the respective destination indexes. Therefore if you have a writer open on any of them, it should be closed, or you should use merge(Directory, Directory, IndexWriter, DirectoryTaxonomyWriter) instead.

Throws:
IOException
See Also:
merge(Directory, Directory, IndexWriter, DirectoryTaxonomyWriter)

merge

public static void merge(org.apache.lucene.store.Directory srcIndexDir,
                         org.apache.lucene.store.Directory srcTaxDir,
                         org.apache.lucene.index.IndexWriter destIndexWriter,
                         DirectoryTaxonomyWriter destTaxWriter)
                  throws IOException
Merges the given taxonomy and index directories and commits the changes to the given writers. This method uses DirectoryTaxonomyWriter.MemoryOrdinalMap to store the mapped ordinals. If you cannot afford the memory, you can use merge(Directory, Directory, DirectoryTaxonomyWriter.OrdinalMap, IndexWriter, DirectoryTaxonomyWriter) by passing DirectoryTaxonomyWriter.DiskOrdinalMap.

Throws:
IOException
See Also:
merge(Directory, Directory, DirectoryTaxonomyWriter.OrdinalMap, IndexWriter, DirectoryTaxonomyWriter)

merge

public static void merge(org.apache.lucene.store.Directory srcIndexDir,
                         org.apache.lucene.store.Directory srcTaxDir,
                         DirectoryTaxonomyWriter.OrdinalMap map,
                         org.apache.lucene.index.IndexWriter destIndexWriter,
                         DirectoryTaxonomyWriter destTaxWriter)
                  throws IOException
Merges the given taxonomy and index directories and commits the changes to the given writers.

Throws:
IOException


Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.