Package org.terrier.structures
Class IndexFactory
- java.lang.Object
-
- org.terrier.structures.IndexFactory
-
public class IndexFactory extends java.lang.ObjectThis is the main developer API for loading an index. You pass anIndexRefto the of() static method, and are return the correspondingIndex, if any can be found. Different indices are supported: anIndexOnDisk, as well as memory indices. An IndexRef can also target a remote REST server, but no Index can be loaded for such an IndexRef.IndexFactory.IndexLoaders are used to load indices; They are found using service discovery.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexFactory.DirectIndexLoaderstatic interfaceIndexFactory.IndexLoader
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ClassLoadercl
-
Constructor Summary
Constructors Constructor Description IndexFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleanisLoaded(IndexRef ref)Is this index already loaded?static booleanisLocal(IndexRef ref)Is this a local index, or a remote one?static Indexof(java.lang.String indexRefString)Shortcut method to avoid instantiating an IndexRefstatic Indexof(IndexRef ref)Load the index for the specified reference.static java.lang.Class<? extends Index>whoSupports(IndexRef ref)
-
-
-
Method Detail
-
isLoaded
public static boolean isLoaded(IndexRef ref)
Is this index already loaded?
-
isLocal
public static boolean isLocal(IndexRef ref)
Is this a local index, or a remote one?
-
of
public static Index of(java.lang.String indexRefString)
Shortcut method to avoid instantiating an IndexRef
-
-