Package org.terrier.realtime.multi
Class MultiDocumentEntry
- java.lang.Object
-
- org.terrier.structures.DocumentIndexEntry
-
- org.terrier.realtime.multi.MultiDocumentEntry
-
- All Implemented Interfaces:
org.apache.hadoop.io.Writable,BitFilePosition,BitIndexPointer,Pointer
public class MultiDocumentEntry extends DocumentIndexEntry
A document index entry that represents a document within a multi-index It stores information about the shard that the document comes from.- Since:
- 4.0
- Author:
- Richard McCreadie, Stuart Mackie
-
-
Field Summary
-
Fields inherited from interface org.terrier.structures.BitIndexPointer
BIT_MASK, FILE_SHIFT, MAX_FILE_ID
-
-
Constructor Summary
Constructors Constructor Description MultiDocumentEntry(DocumentIndexEntry entry, int index)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDocumentIndexShardIndex()java.lang.StringpointerToString()Returns a textual representation of the pointer alonevoidreadFields(java.io.DataInput arg0)voidsetBitIndexPointer(BitIndexPointer pointer)Update this pointer to reflect the same values as the specified pointervoidsetDocumentIndexShardIndex(int documentIndexShardIndex)voidsetNumberOfEntries(int n)Set the number of "things" that the pointer refers to.voidsetOffset(BitFilePosition pos)Sets the bit file position within this object to that represented by the specified bit file position.voidsetPointer(Pointer p)Sets the pointer within this object to that represented by the specified pointer.voidwrite(java.io.DataOutput arg0)-
Methods inherited from class org.terrier.structures.DocumentIndexEntry
getDocumentLength, getFileNumber, getNumberOfEntries, getOffset, getOffsetBits, setDocumentLength, setFileNumber, setOffset, toString
-
-
-
-
Constructor Detail
-
MultiDocumentEntry
public MultiDocumentEntry(DocumentIndexEntry entry, int index)
-
-
Method Detail
-
setBitIndexPointer
public void setBitIndexPointer(BitIndexPointer pointer)
Description copied from interface:BitIndexPointerUpdate this pointer to reflect the same values as the specified pointer- Parameters:
pointer- the pointer to use to set the byte offset, bit offset and file number parameters.
-
setOffset
public void setOffset(BitFilePosition pos)
Description copied from interface:BitFilePositionSets the bit file position within this object to that represented by the specified bit file position.- Parameters:
pos- other bit file position to update the bit file position in this object.
-
readFields
public void readFields(java.io.DataInput arg0) throws java.io.IOException- Throws:
java.io.IOException
-
write
public void write(java.io.DataOutput arg0) throws java.io.IOException- Throws:
java.io.IOException
-
setNumberOfEntries
public void setNumberOfEntries(int n)
Description copied from interface:PointerSet the number of "things" that the pointer refers to.- Parameters:
n- the number of "things" that the pointer refers to.
-
pointerToString
public java.lang.String pointerToString()
Description copied from interface:PointerReturns a textual representation of the pointer alone
-
setPointer
public void setPointer(Pointer p)
Description copied from interface:PointerSets the pointer within this object to that represented by the specified pointer.- Parameters:
p- other pointer to update the pointer in this object.
-
getDocumentIndexShardIndex
public int getDocumentIndexShardIndex()
-
setDocumentIndexShardIndex
public void setDocumentIndexShardIndex(int documentIndexShardIndex)
-
-