Terrier IR Platform
1.1.1

uk.ac.gla.terrier.structures
Class Index

java.lang.Object
  extended by uk.ac.gla.terrier.structures.Index

public class Index
extends java.lang.Object

This class encapsulates all the Indexes at retrieval time. It is loaded by giving a path. Note, if you create other types of index other than normal and Block, then you'll may need to subclass this object. This class uses CollectionStatistics .getClasses() to determine which classes to use for the Lexicon, DocumentIndex, DirectIndex & the InvertedIndex. Fully qualified class names should be saved to the second line of the CollectionStatistics file (data.log)

Version:
$Revision: 1.24 $
Author:
Craig Macdonald & Vassilis Plachouras

Method Summary
 void close()
          Closes the data structures of the index.
static Index createIndex()
          Factory method for creating an index.
static Index createIndex(java.lang.String path, java.lang.String prefix)
          Factory method for creating an index.
 CollectionStatistics getCollectionStatistics()
           
 DirectIndex getDirectIndex()
          Return the direct index to use for retrieval.
 DocumentIndex getDocumentIndex()
          Return the document index to use for retrieval.
 InvertedIndex getInvertedIndex()
          Return the inverted index to use for retrieval.
 Lexicon getLexicon()
          Return the lexicon to use for retrieval.
 java.lang.String getPath()
           
 java.lang.String getPrefix()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

close

public void close()
Closes the data structures of the index.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getDirectIndex

public DirectIndex getDirectIndex()
Return the direct index to use for retrieval.

Returns:
DirectIndex the direct index used for retrieval.

getCollectionStatistics

public CollectionStatistics getCollectionStatistics()

getDocumentIndex

public DocumentIndex getDocumentIndex()
Return the document index to use for retrieval.

Returns:
DocumentIndex the document index used for retrieval.

getInvertedIndex

public InvertedIndex getInvertedIndex()
Return the inverted index to use for retrieval.

Returns:
InvertedIndex the inverted index used for retrieval.

getLexicon

public Lexicon getLexicon()
Return the lexicon to use for retrieval.

Returns:
Lexicon the lexicon used for retrieval.

getPath

public java.lang.String getPath()

getPrefix

public java.lang.String getPrefix()

createIndex

public static Index createIndex(java.lang.String path,
                                java.lang.String prefix)
Factory method for creating an index. This method should be used in order to create an index in the applications.

Parameters:
path - String the path in which the data structures will be created.
prefix - String the prefix of the files to be created.

createIndex

public static Index createIndex()
Factory method for creating an index. This method should be used in order to create an index in the applications.


Terrier IR Platform
1.1.1

Terrier Information Retrieval Platform 1.1.1. Copyright 2004-2007 University of Glasgow