uk.ac.gla.terrier.structures
Class DocIndexEncodedHash
java.lang.Object
uk.ac.gla.terrier.structures.DocumentIndex
uk.ac.gla.terrier.structures.DocumentIndexEncoded
uk.ac.gla.terrier.structures.DocIndexEncodedHash
- All Implemented Interfaces:
- Closeable, IndexConfigurable
public class DocIndexEncodedHash
- extends DocumentIndexEncoded
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 java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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 Information Retrieval Platform 2.2.1. Copyright 2004-2008 University of Glasgow