org.apache.lucene.index
Class IndexUtils

java.lang.Object
  extended byorg.apache.lucene.index.IndexUtils

public class IndexUtils
extends java.lang.Object


Constructor Summary
IndexUtils()
           
 
Method Summary
static void truncateIndex(org.apache.lucene.store.Directory dir)
          Truncates an index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IndexUtils

public IndexUtils()
Method Detail

truncateIndex

public static void truncateIndex(org.apache.lucene.store.Directory dir)
                          throws java.io.IOException
Truncates an index. Instead of deleting all documents in an index via an IndexReader, All available segments are marked as deleted by their files to the "deletable" file. This has the benefit of faster index merges, whilst not offending any open readers.

Parameters:
dir -
Throws:
java.io.IOException


Copyright © 2006-2009 Atlassian Software Systems Pty Ltd. All Rights Reserved.