Skip navigation links

Package org.terrier.structures.postings

Provides classes representing single postings and atreams of postings in a posting list (e.g.

See: Description

Package org.terrier.structures.postings Description

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:

In all cases during retrieval, IterablePosting implementations which also implement Posting, BlockPosting and/or FieldPosting are used, depending on how indexing has been performed. To see how to configure indexing, see Configure Indexing.
Skip navigation links

Terrier Information Retrieval Platform 5.1. Copyright © 2004-2019, University of Glasgow