public class IndexUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
TIMESTAMP_FILE |
Constructor and Description |
---|
IndexUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
close(org.apache.lucene.store.Directory d) |
static void |
close(org.apache.lucene.store.IndexInput in) |
static void |
close(org.apache.lucene.store.IndexOutput io) |
static void |
close(org.apache.lucene.index.IndexReader r) |
static void |
close(org.apache.lucene.index.IndexWriter w) |
static void |
close(java.io.InputStream is) |
static void |
close(java.io.OutputStream os) |
static ArtifactInfo |
constructArtifactInfo(org.apache.lucene.document.Document doc,
IndexingContext context) |
static void |
copyDirectory(org.apache.lucene.store.Directory source,
org.apache.lucene.store.Directory target) |
static boolean |
copyFile(org.apache.lucene.store.Directory source,
org.apache.lucene.store.Directory target,
java.lang.String name) |
static boolean |
copyFile(org.apache.lucene.store.Directory source,
org.apache.lucene.store.Directory target,
java.lang.String srcName,
java.lang.String targetName) |
static void |
delete(java.io.File indexDir) |
static void |
deleteTimestamp(org.apache.lucene.store.Directory directory) |
static java.util.Date |
getTimestamp(org.apache.lucene.store.Directory directory) |
static org.apache.lucene.document.Document |
updateDocument(org.apache.lucene.document.Document doc,
IndexingContext context) |
static org.apache.lucene.document.Document |
updateDocument(org.apache.lucene.document.Document doc,
IndexingContext context,
boolean updateLastModified) |
static org.apache.lucene.document.Document |
updateDocument(org.apache.lucene.document.Document doc,
IndexingContext context,
boolean updateLastModified,
ArtifactInfo ai) |
static void |
updateTimestamp(org.apache.lucene.store.Directory directory,
java.util.Date timestamp) |
public static final java.lang.String TIMESTAMP_FILE
public static void copyDirectory(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target) throws java.io.IOException
java.io.IOException
public static boolean copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, java.lang.String name) throws java.io.IOException
java.io.IOException
public static boolean copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, java.lang.String srcName, java.lang.String targetName) throws java.io.IOException
java.io.IOException
public static ArtifactInfo constructArtifactInfo(org.apache.lucene.document.Document doc, IndexingContext context)
public static org.apache.lucene.document.Document updateDocument(org.apache.lucene.document.Document doc, IndexingContext context)
public static org.apache.lucene.document.Document updateDocument(org.apache.lucene.document.Document doc, IndexingContext context, boolean updateLastModified)
public static org.apache.lucene.document.Document updateDocument(org.apache.lucene.document.Document doc, IndexingContext context, boolean updateLastModified, ArtifactInfo ai)
public static void deleteTimestamp(org.apache.lucene.store.Directory directory) throws java.io.IOException
java.io.IOException
public static void updateTimestamp(org.apache.lucene.store.Directory directory, java.util.Date timestamp) throws java.io.IOException
java.io.IOException
public static java.util.Date getTimestamp(org.apache.lucene.store.Directory directory)
public static void close(java.io.OutputStream os)
public static void close(java.io.InputStream is)
public static void close(org.apache.lucene.store.IndexOutput io)
public static void close(org.apache.lucene.store.IndexInput in)
public static void close(org.apache.lucene.index.IndexReader r)
public static void close(org.apache.lucene.index.IndexWriter w)
public static void close(org.apache.lucene.store.Directory d)
public static void delete(java.io.File indexDir)