|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PostFilter
PostFilters are designed to complement PostProcesses. While PostProcesses
operate on the entire resultset at once, with PostFilters, each PostFilter
is called for each result in the resultset. According to the return of filter()
the result can then be included, discarded, or (un)boosted in the resultset. Possible
return values for filter are FILTER_OK, FILTER_REMOVE, FILTER_ADJUSTED
Which PostFilters are run, and when is controlled by two properties, as mentioned below.
Properties
Field Summary | |
---|---|
static byte |
FILTER_ADJUSTED
The score for this result has been adjusted, please ensure the resultset is re-sorted |
static byte |
FILTER_OK
This result should be included in the resultset |
static byte |
FILTER_REMOVE
This result should not be included in the resultset |
Method Summary | |
---|---|
byte |
filter(Manager m,
SearchRequest srq,
ResultSet results,
int DocAtNumber,
int DocNo)
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. |
Field Detail |
---|
static final byte FILTER_OK
static final byte FILTER_REMOVE
static final byte FILTER_ADJUSTED
Method Detail |
---|
void new_query(Manager m, SearchRequest srq, ResultSet rs)
m
- The manager controlling this querysrq
- The search request being processedrs
- the resultset that is being iterated throughbyte filter(Manager m, SearchRequest srq, ResultSet results, int DocAtNumber, int DocNo)
m
- The manager controlling this querysrq
- The search request being processedDocAtNumber
- which array index in the resultset have we reachedDocNo
- The document number of the currently being procesed result.
|
Terrier IR Platform 2.2.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |