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 int
getDocumentIndexShardIndex()
java.lang.String
pointerToString()
Returns a textual representation of the pointer alonevoid
readFields(java.io.DataInput arg0)
void
setBitIndexPointer(BitIndexPointer pointer)
Update this pointer to reflect the same values as the specified pointervoid
setDocumentIndexShardIndex(int documentIndexShardIndex)
void
setNumberOfEntries(int n)
Set the number of "things" that the pointer refers to.void
setOffset(BitFilePosition pos)
Sets the bit file position within this object to that represented by the specified bit file position.void
setPointer(Pointer p)
Sets the pointer within this object to that represented by the specified pointer.void
write(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:BitIndexPointer
Update 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:BitFilePosition
Sets 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:Pointer
Set 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:Pointer
Returns a textual representation of the pointer alone
-
setPointer
public void setPointer(Pointer p)
Description copied from interface:Pointer
Sets 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)
-
-