Package org.terrier.structures
Class FSAFieldDocumentIndex
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<V>
-
- org.terrier.structures.collections.FSArrayFile<DocumentIndexEntry>
-
- org.terrier.structures.FSADocumentIndex
-
- org.terrier.structures.FSAFieldDocumentIndex
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,java.lang.Iterable<DocumentIndexEntry>
,java.util.Collection<DocumentIndexEntry>
,java.util.List<DocumentIndexEntry>
,DocumentIndex
,FieldDocumentIndex
public class FSAFieldDocumentIndex extends FSADocumentIndex implements FieldDocumentIndex
Fields document index stored as a fixed size array
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.terrier.structures.FSADocumentIndex
FSADocumentIndex.FSADocumentIndexIterator
-
Nested classes/interfaces inherited from class org.terrier.structures.collections.FSArrayFile
FSArrayFile.ArrayFileIterator<V extends org.apache.hadoop.io.Writable>, FSArrayFile.ArrayFileWriter
-
-
Field Summary
-
Fields inherited from class org.terrier.structures.FSADocumentIndex
docLengths, lastDocid, lastEntry, logger
-
Fields inherited from class org.terrier.structures.collections.FSArrayFile
dataFile, dataFilename, entrySize, numberOfEntries, USUAL_EXTENSION, valueFactory
-
-
Constructor Summary
Constructors Constructor Description FSAFieldDocumentIndex(IndexOnDisk index, java.lang.String structureName)
Construct an instance of the class with
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getFieldLengths(int docid)
Get the length of each fieldprotected void
initialise(IndexOnDisk index, java.lang.String structureName)
-
Methods inherited from class org.terrier.structures.FSADocumentIndex
getDocumentEntry, getDocumentLength, getNumberOfDocuments
-
Methods inherited from class org.terrier.structures.collections.FSArrayFile
close, get, iterator, size, writeFSArrayFile
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.terrier.structures.DocumentIndex
getDocumentEntry, getDocumentLength, getNumberOfDocuments
-
-
-
-
Constructor Detail
-
FSAFieldDocumentIndex
public FSAFieldDocumentIndex(IndexOnDisk index, java.lang.String structureName) throws java.io.IOException
Construct an instance of the class with- Parameters:
index
-structureName
-- Throws:
java.io.IOException
-
-
Method Detail
-
initialise
protected void initialise(IndexOnDisk index, java.lang.String structureName) throws java.io.IOException
- Overrides:
initialise
in classFSADocumentIndex
- Throws:
java.io.IOException
-
getFieldLengths
public int[] getFieldLengths(int docid) throws java.io.IOException
Get the length of each field- Specified by:
getFieldLengths
in interfaceFieldDocumentIndex
- Throws:
java.io.IOException
-
-