org.terrier.querying
Class Scope
java.lang.Object
org.terrier.querying.Scope
- All Implemented Interfaces:
- PostFilter
public class Scope
- extends java.lang.Object
- implements PostFilter
Checks that the prefix of the document number (upto the first "-") is included in
this list of scopes as given by the scope control.
This is a PostFilter, so new_query() is called for each new query, and filter()
is called for each result in the resultset.
- Author:
- Craig Macdonald
Constructor Summary |
Scope()
|
Method Summary |
byte |
filter(Manager m,
SearchRequest srq,
ResultSet rs,
int DocAtNo,
int docid)
Called for each result in the resultset, used to filter out unwanted results,
based on the presence of some strings in the document number. |
void |
new_query(Manager m,
SearchRequest srq,
ResultSet rs)
Creates a HashSet of scopes that can are allowed to
be in the document number prefix. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Scope
public Scope()
new_query
public void new_query(Manager m,
SearchRequest srq,
ResultSet rs)
- Creates a HashSet of scopes that can are allowed to
be in the document number prefix.
- Specified by:
new_query
in interface PostFilter
- Parameters:
m
- Manager the manager used for processing the request.srq
- SearchRequest the search request to process.rs
- ResultSet the result set for the search request.
filter
public byte filter(Manager m,
SearchRequest srq,
ResultSet rs,
int DocAtNo,
int docid)
- Called for each result in the resultset, used to filter out unwanted results,
based on the presence of some strings in the document number. The document number
upto the first "-" is checked for presence in the scopes HashSet.
- Specified by:
filter
in interface PostFilter
- Parameters:
m
- The manager controlling this querysrq
- The search request being processedrs
- the resultset that is being iterated throughDocAtNo
- which array index in the resultset have we reacheddocid
- The document number of the currently being procesed result.
Terrier 3.5. Copyright © 2004-2011 University of Glasgow