Terrier IR Platform
2.2.1

uk.ac.gla.terrier.structures
Class DocIndexEncodedHash

java.lang.Object
  extended by uk.ac.gla.terrier.structures.DocumentIndex
      extended by uk.ac.gla.terrier.structures.DocumentIndexEncoded
          extended by uk.ac.gla.terrier.structures.DocIndexEncodedHash
All Implemented Interfaces:
Closeable, IndexConfigurable

public class DocIndexEncodedHash
extends DocumentIndexEncoded


Field Summary
 
Fields inherited from class uk.ac.gla.terrier.structures.DocumentIndex
entryLength
 
Constructor Summary
DocIndexEncodedHash()
           
DocIndexEncodedHash(java.lang.String filename)
           
DocIndexEncodedHash(java.lang.String path, java.lang.String prefix)
           
 
Method Summary
 int getDocumentId(java.lang.String docno)
          Returns the id of a document with a given document number.
static void main(java.lang.String[] args)
           
 boolean seek(java.lang.String docno)
          Overrides the seek(String s) method of the super class.
 
Methods inherited from class uk.ac.gla.terrier.structures.DocumentIndexEncoded
getDirectIndexEndOffset, getDirectIndexStartOffset, getDocumentLength, getDocumentLength, getDocumentNumber, getNumberOfDocuments, loadIntoMemory, print, seek, setDocnoEntryLength
 
Methods inherited from class uk.ac.gla.terrier.structures.DocumentIndex
close, setIndex
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DocIndexEncodedHash

public DocIndexEncodedHash(java.lang.String path,
                           java.lang.String prefix)
                    throws java.io.IOException
Throws:
java.io.IOException

DocIndexEncodedHash

public DocIndexEncodedHash(java.lang.String filename)
                    throws java.io.IOException
Throws:
java.io.IOException

DocIndexEncodedHash

public DocIndexEncodedHash()
                    throws java.io.IOException
Throws:
java.io.IOException
Method Detail

seek

public boolean seek(java.lang.String docno)
Description copied from class: DocumentIndexEncoded
Overrides the seek(String s) method of the super class.

Overrides:
seek in class DocumentIndexEncoded
Parameters:
docno - String the document number of the document we are seeking.
Returns:
Returns false if the given docno could not be found in the DocumentIndex

getDocumentId

public int getDocumentId(java.lang.String docno)
Description copied from class: DocumentIndexEncoded
Returns the id of a document with a given document number.

Overrides:
getDocumentId in class DocumentIndexEncoded
Parameters:
docno - java.lang.String The document's number
Returns:
int The document's id, or a negative number if a document with the given number doesn't exist.

main

public static void main(java.lang.String[] args)

Terrier IR Platform
2.2.1

Terrier Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow