Package org.terrier.structures.postings
Provides classes representing single postings and atreams of postings in a posting list (e.g. an inverted index or a direct index).
A single posting (e.g. occurrences of a term in document) is represented by a Posting object.
Posting p; System.out.println("Docid "+ p.getId() + " has " + p.getFrequency() + " occurrences");
A stream of postings (e.g. terms in a document or occurrences of a term) are represented by an IterablePosting stream.
IterablePosting ip = //obtain from InvertedIndex; while(ip.next() != IterablePosting.EOL) { System.err.println("Docid "+ ip.getId() + " has " + ip.getFrequency() + " occurrences"); }
More complex posting implementations are supported by other Posting child interfaces:
- Posting - basic posting: id, frequency and document length only.
- BlockPosting - positions of occurrences are available.
- FieldPosting - the frequencies in each field, as well as field lengths are available.
-
Interface Summary Interface Description BlockPosting Interface implemented by posting objects that have position information recorded.FieldPosting Interface implemented by posting objects that have field information recorded.IterablePosting An interface that allows a list of postings to be iterated over.Posting This interface represents one posting in a posting list.WritablePosting Allow aPosting
to be serialized to a DataOut. -
Class Summary Class Description ANDIterablePosting An instance of IterablePostings that works with passed arrays of ids and frequencies.ArrayOfBasicIterablePosting An instance of IterablePostings that works with passed arrays of ids and frequenciesArrayOfBlockFieldIterablePosting An array structure that golds BlockFieldIterablePostingsArrayOfBlockIterablePosting An array structure that golds BlockIterablePostingsArrayOfFieldIterablePosting An instance of IterablePostings that works with passed arrays of ids and frequencies for each field.ArrayOfIdsIterablePosting An instance of IterablePostings that works with a passed array of idsBasicPostingImpl Implementation of a Posting that is non-iterable.BlockFieldORIterablePosting ORIterablePosting implementation that implements FieldPosting and BlockPostingBlockFieldPostingImpl A writable block field posting listBlockORIterablePosting ORIterablePosting implementation that implements BlockPostingBlockPostingImpl BlockPostingImpl classFieldOnlyIterablePosting This class takes an IterablePosting list that has fields, and makes it appear as a single basic posting list.FieldORIterablePosting ORIterablePosting implementation that implements FieldPostingFieldPostingImpl Implementation of a posting containing fieldsIterablePostingImpl A base implementation of an IterablePosting, that provides a base implementation of next(int) method.ORIterablePosting An IterablePosting that combines more than one IterablePosting into a single IterablePosting.PhraseIterablePosting Implementation of an IterablePosting for block indices that returns only documents that match a multi-term phase.PostingIdComparator A comparator object for Posting objects, where they are sorted by id.PostingTestUtils PostingUtil Handy methods for Posting classes, such as obtaining all ids in a posting list, or selecting the minimum id in an array of posting lists.PostingUtil.DocidSpecificDocumentIndex ProximityIterablePosting Implementation of an IterablePosting for block indices that returns only documents that match phases within a fixed window size.