org.terrier.structures.postings
Class ProximityIterablePosting

java.lang.Object
  extended by org.terrier.structures.postings.IterablePostingImpl
      extended by org.terrier.structures.postings.ANDIterablePosting
          extended by org.terrier.structures.postings.ProximityIterablePosting
All Implemented Interfaces:
Closeable, IterablePosting, Posting

public class ProximityIterablePosting
extends ANDIterablePosting

Implementation of an IterablePosting for block indices that returns only documents that match phases within a fixed window size.

Since:
3.6
Author:
Matteo Catena and Richard McCreadie

Field Summary
protected  int window
           
 
Fields inherited from class org.terrier.structures.postings.ANDIterablePosting
currentId, frequency, ips, termCount
 
Fields inherited from interface org.terrier.structures.postings.IterablePosting
EOL
 
Constructor Summary
ProximityIterablePosting(IterablePosting[] _ips, Pointer[] _p, int window)
           
 
Method Summary
protected  boolean calculateFrequency()
          returns true if the document matches
static IterablePosting createProximityPostingList(Pointer[] ps, PostingIndex<Pointer> invIndex, int blockDistance)
           
static IterablePosting createProximityPostingList(String[] terms, Lexicon<String> lex, PostingIndex<Pointer> invIndex, int blockDistance)
           
 
Methods inherited from class org.terrier.structures.postings.ANDIterablePosting
asWritablePosting, close, endOfPostings, getDocumentLength, getFrequency, getId, next, setId
 
Methods inherited from class org.terrier.structures.postings.IterablePostingImpl
next
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

window

protected int window
Constructor Detail

ProximityIterablePosting

public ProximityIterablePosting(IterablePosting[] _ips,
                                Pointer[] _p,
                                int window)
                         throws IOException
Throws:
IOException
Method Detail

calculateFrequency

protected boolean calculateFrequency()
Description copied from class: ANDIterablePosting
returns true if the document matches

Overrides:
calculateFrequency in class ANDIterablePosting

createProximityPostingList

public static IterablePosting createProximityPostingList(Pointer[] ps,
                                                         PostingIndex<Pointer> invIndex,
                                                         int blockDistance)
                                                  throws IOException
Throws:
IOException

createProximityPostingList

public static IterablePosting createProximityPostingList(String[] terms,
                                                         Lexicon<String> lex,
                                                         PostingIndex<Pointer> invIndex,
                                                         int blockDistance)
                                                  throws IOException
Throws:
IOException


Terrier 3.6. Copyright © 2004-2011 University of Glasgow