public class IndexUtils extends Object
Modifier and Type | Field and Description |
---|---|
static 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(InputStream is) |
static void |
close(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,
String name) |
static boolean |
copyFile(org.apache.lucene.store.Directory source,
org.apache.lucene.store.Directory target,
String srcName,
String targetName) |
static void |
delete(File indexDir) |
static void |
deleteTimestamp(org.apache.lucene.store.Directory directory) |
static 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,
Date timestamp) |
public static final String TIMESTAMP_FILE
public static void copyDirectory(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target) throws IOException
IOException
public static boolean copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, String name) throws IOException
IOException
public static boolean copyFile(org.apache.lucene.store.Directory source, org.apache.lucene.store.Directory target, String srcName, String targetName) throws IOException
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 IOException
IOException
public static void updateTimestamp(org.apache.lucene.store.Directory directory, Date timestamp) throws IOException
IOException
public static Date getTimestamp(org.apache.lucene.store.Directory directory)
public static void close(OutputStream os)
public static void close(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(File indexDir)
Copyright © 2002–2017 The Apache Software Foundation. All rights reserved.