org.terrier.structures.postings
Class PhraseIterablePosting
java.lang.Object
org.terrier.structures.postings.IterablePostingImpl
org.terrier.structures.postings.ANDIterablePosting
org.terrier.structures.postings.PhraseIterablePosting
- All Implemented Interfaces:
- Closeable, BlockPosting, IterablePosting, Posting
public class PhraseIterablePosting
- extends ANDIterablePosting
- implements BlockPosting
Implementation of an IterablePosting for block indices that returns
only documents that match a multi-term phase.
- Since:
- 3.5
- Author:
- Craig Macdonald
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PhraseIterablePosting
public PhraseIterablePosting(IterablePosting[] _ips,
Pointer[] _p,
boolean recordPositions)
throws IOException
- Throws:
IOException
asWritablePosting
public WritablePosting asWritablePosting()
- Description copied from interface:
Posting
- Copies this posting to one free of an iterator. Kind of like a clone.
- Specified by:
asWritablePosting
in interface Posting
- Overrides:
asWritablePosting
in class ANDIterablePosting
- Returns:
- an identical posting, but which can be maniulated free of this iterator
calculateFrequency
protected boolean calculateFrequency()
- Description copied from class:
ANDIterablePosting
- returns true if the document matches
- Overrides:
calculateFrequency
in class ANDIterablePosting
getPositions
public int[] getPositions()
- Description copied from interface:
BlockPosting
- Return positions of occurrences
- Specified by:
getPositions
in interface BlockPosting
createPhrasePostingList
public static IterablePosting createPhrasePostingList(Pointer[] ps,
PostingIndex<Pointer> invIndex,
boolean savePositions)
throws IOException
- Throws:
IOException
createPhrasePostingList
public static IterablePosting createPhrasePostingList(String[] terms,
Lexicon<String> lex,
PostingIndex<Pointer> invIndex,
boolean savePositions)
throws IOException
- Throws:
IOException
Terrier 3.6. Copyright © 2004-2011 University of Glasgow