@Component(role=IndexUpdater.class) public class DefaultIndexUpdater extends org.codehaus.plexus.logging.AbstractLogEnabled implements IndexUpdater
Modifier and Type | Class and Description |
---|---|
static class |
DefaultIndexUpdater.FileFetcher
Filesystem-based ResourceFetcher implementation
|
Constructor and Description |
---|
DefaultIndexUpdater() |
DefaultIndexUpdater(IncrementalHandler handler,
List<IndexUpdateSideEffect> mySideeffects) |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanCacheDirectory(File dir)
Cleans specified cache directory.
|
IndexUpdateResult |
fetchAndUpdateIndex(IndexUpdateRequest updateRequest) |
Date |
getTimestamp(Properties properties,
String key) |
static Date |
unpackIndexArchive(InputStream is,
org.apache.lucene.store.Directory directory,
IndexingContext context)
Unpack legacy index archive into a specified Lucene
Directory |
static Date |
unpackIndexData(InputStream is,
org.apache.lucene.store.Directory d,
IndexingContext context)
Unpack index data using specified Lucene Index writer
|
public DefaultIndexUpdater(IncrementalHandler handler, List<IndexUpdateSideEffect> mySideeffects)
public DefaultIndexUpdater()
public IndexUpdateResult fetchAndUpdateIndex(IndexUpdateRequest updateRequest) throws IOException
fetchAndUpdateIndex
in interface IndexUpdater
IOException
public static Date unpackIndexArchive(InputStream is, org.apache.lucene.store.Directory directory, IndexingContext context) throws IOException
Directory
is
- a ZipInputStream
with index datadirectory
- Lucene Directory
to unpack index data toDate
of the index update or null if it can't be readIOException
public Date getTimestamp(Properties properties, String key)
public static Date unpackIndexData(InputStream is, org.apache.lucene.store.Directory d, IndexingContext context) throws IOException
is
- an input stream to unpack index data fromw
- a writer to save index dataics
- a collection of index creators for updating unpacked documents.IOException
protected void cleanCacheDirectory(File dir) throws IOException
IOException
Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.