|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.structures.IndexUtil
public class IndexUtil
Class with handy utilities for use on an Index.
Constructor Summary | |
---|---|
IndexUtil()
|
Method Summary | |
---|---|
static void |
close(java.lang.Object o)
Check to see if an object is closeable, and if so, close it. |
static void |
configure(Index index,
java.lang.Object o)
Configures an object with the index, if the object implements IndexConfigurable |
static boolean |
copyStructure(Index sourceIndex,
Index destIndex,
java.lang.String sourceStructureName,
java.lang.String destinationStructureName)
Copies an index structure from one index to another. |
static void |
deleteIndex(java.lang.String path,
java.lang.String prefix)
Delete an existing index |
static boolean |
deleteStructure(Index index,
java.lang.String structureName)
Delete the named structure from the specified index. |
static void |
forceReloadStructure(Index index,
java.lang.String structureName)
Forces a structure to be reloaded, by removing it from the index's structure cache |
static void |
forceStructure(Index index,
java.lang.String structureName,
java.lang.Object structure)
Force the specified object into the structure cache of the specified object, as the given structure name |
static java.lang.String[] |
getStructures(Index index)
Returns a list of the structures in the given index |
static void |
main(java.lang.String[] args)
Has some handy utilities for printing various index structures to System.out. |
static void |
printDocumentIndex(Index index,
java.lang.String structureName)
Print the contents of the document index |
static void |
printMetaIndex(Index index,
java.lang.String structureName)
Print the contents of the meta index |
static void |
renameIndex(java.lang.String srcPath,
java.lang.String srcPrefix,
java.lang.String dstPath,
java.lang.String dstPrefix)
Move an index from one location to another |
static boolean |
renameIndexStructure(Index index,
java.lang.String sourceStructureName,
java.lang.String destinationStructureName)
Rename a structure within a given index. |
static Index |
reOpenIndex(Index index)
Reopen an existing index |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IndexUtil()
Method Detail |
---|
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public static void forceStructure(Index index, java.lang.String structureName, java.lang.Object structure)
index
- Index to operate onstructureName
- which structure name to usestructure
- which object to put into the structure cachepublic static void forceReloadStructure(Index index, java.lang.String structureName)
public static Index reOpenIndex(Index index) throws java.io.IOException
java.io.IOException
public static java.lang.String[] getStructures(Index index)
public static void renameIndex(java.lang.String srcPath, java.lang.String srcPrefix, java.lang.String dstPath, java.lang.String dstPrefix) throws java.io.IOException
java.io.IOException
public static void deleteIndex(java.lang.String path, java.lang.String prefix) throws java.io.IOException
java.io.IOException
public static void printDocumentIndex(Index index, java.lang.String structureName) throws java.io.IOException
java.io.IOException
public static boolean deleteStructure(Index index, java.lang.String structureName) throws java.io.IOException
index
- - index to operate onstructureName
- name of structure to delete
java.io.IOException
public static boolean copyStructure(Index sourceIndex, Index destIndex, java.lang.String sourceStructureName, java.lang.String destinationStructureName) throws java.io.IOException
sourceIndex
- destIndex
- sourceStructureName
- destinationStructureName
-
java.io.IOException
- if an IO problem occurspublic static void printMetaIndex(Index index, java.lang.String structureName) throws java.io.IOException
java.io.IOException
public static boolean renameIndexStructure(Index index, java.lang.String sourceStructureName, java.lang.String destinationStructureName) throws java.io.IOException
java.io.IOException
public static void configure(Index index, java.lang.Object o)
public static void close(java.lang.Object o) throws java.io.IOException
o
- object to check for being closeable.
java.io.IOException
- if exception thrown while closing.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |