org.terrier.querying
Class SimpleDecorate

java.lang.Object
  extended by org.terrier.querying.SimpleDecorate
All Implemented Interfaces:
PostFilter

public class SimpleDecorate
extends Object
implements PostFilter

A simple decorator, which applies all metadata in the MetaIndex to each retrieved, displayed document.


Field Summary
protected static Pattern controlNonVisibleCharacters
           
 
Fields inherited from interface org.terrier.querying.PostFilter
FILTER_ADJUSTED, FILTER_OK, FILTER_REMOVE
 
Constructor Summary
SimpleDecorate()
           
 
Method Summary
 byte filter(Manager m, SearchRequest srq, ResultSet results, int rank, int docid)
          Adds all the metadata for the specified document occurring at the specified rank to the ResultSet Called for each result in the resultset, used to filter out unwanted results.
 void new_query(Manager m, SearchRequest srq, ResultSet rs)
          Called before the processing of a resultset using this PostFilter is applied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

controlNonVisibleCharacters

protected static final Pattern controlNonVisibleCharacters
Constructor Detail

SimpleDecorate

public SimpleDecorate()
Method Detail

filter

public final byte filter(Manager m,
                         SearchRequest srq,
                         ResultSet results,
                         int rank,
                         int docid)
Adds all the metadata for the specified document occurring at the specified rank to the ResultSet Called for each result in the resultset, used to filter out unwanted results.

Specified by:
filter in interface PostFilter
Parameters:
m - The manager controlling this query
srq - The search request being processed
rank - which array index (rank) in the resultset have we reached
docid - The docid of the currently being procesed result.

new_query

public void new_query(Manager m,
                      SearchRequest srq,
                      ResultSet rs)
Called before the processing of a resultset using this PostFilter is applied. Can be used to save information for the duration of the query.

Specified by:
new_query in interface PostFilter
Parameters:
m - The manager controlling this query
srq - The search request being processed
rs - the resultset that is being iterated through


Terrier 3.6. Copyright © 2004-2011 University of Glasgow