Package org.terrier.structures.postings
Interface Posting
-
- All Known Subinterfaces:
BlockPosting
,FieldPosting
,IterablePosting
,WritablePosting
- All Known Implementing Classes:
ANDIterablePosting
,ArrayOfBasicIterablePosting
,ArrayOfBlockFieldIterablePosting
,ArrayOfBlockIterablePosting
,ArrayOfFieldIterablePosting
,ArrayOfIdsIterablePosting
,BasicIterablePosting
,BasicIterablePostingDocidOnly
,BasicPostingImpl
,BlockFieldIterablePosting
,BlockFieldORIterablePosting
,BlockFieldPostingImpl
,BlockIterablePosting
,BlockMultiDirectIterablePosting
,BlockMultiIterablePosting
,BlockORIterablePosting
,BlockPostingImpl
,DocumentPostingList.postingIterator
,FieldIterablePosting
,FieldOnlyIterablePosting
,FieldORIterablePosting
,FieldPostingImpl
,IterablePostingImpl
,MemoryDirectIterablePosting
,MemoryFieldsDirectIterablePosting
,MemoryFieldsIterablePosting
,MemoryIterablePosting
,MultiDirectIterablePosting
,MultiIterablePosting
,ORIterablePosting
,PhraseIterablePosting
,ProximityIterablePosting
public interface Posting
This interface represents one posting in a posting list. From a Posting object, the id of the posting list entry (e.g. document id for inverted index, or term id for direct index), the frequency, and the length of the document can be accessed.- Since:
- 3.0
- Author:
- Craig Macdonald
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description WritablePosting
asWritablePosting()
Copy this posting to one free of an iterator.int
getDocumentLength()
Return the length of the document of the current posting in tokens.int
getFrequency()
Return the frequency of the term in the current document, in tokens.int
getId()
Return the id of the current posting.default void
setId(int id)
Deprecated.
-
-
-
Method Detail
-
getId
int getId()
Return the id of the current posting. For the inverted index, this is the current docid; for the direct index it corresponds to the current term id.- Returns:
- id of the posting.
-
getFrequency
int getFrequency()
Return the frequency of the term in the current document, in tokens.- Returns:
- frequency of the term in the current document, in tokens.
-
getDocumentLength
int getDocumentLength()
Return the length of the document of the current posting in tokens. Usually uses the DocumentIndex, may do otherwise if document length statistics are in posting list.- Returns:
- length of the document of the current posting in tokens.
-
setId
@Deprecated default void setId(int id)
Deprecated.This will be removed in a future release
-
asWritablePosting
WritablePosting asWritablePosting()
Copy this posting to one free of an iterator. Kind of like a clone.- Returns:
- an identical posting, but which can be manipulated free of this iterator
-
-