public class Decorate extends Object implements PostProcess, PostFilter
| Modifier and Type | Field and Description | 
|---|---|
| protected static Pattern | cleanQuery | 
| protected static String[] | CONTROL_VALUE_DELIMSdelimiters for breaking down the values of controls further | 
| protected static Pattern | controlNonVisibleCharacters | 
| protected Matcher | controlNonVisibleCharactersMatcher | 
| protected static StringTools.ESCAPE | defaultEscapewhat is the default escape sequence | 
| protected Set<String> | earlyKeys | 
| protected Set<String> | emphasisKeys | 
| protected Map<String,StringTools.ESCAPE> | escapeKeys | 
| protected Pattern | highlighthighlighting pattern for the current query | 
| protected gnu.trove.TObjectIntHashMap<String> | keys | 
| protected LRUMap<Integer,String[]> | metaCacheThe cache used for the meta data. | 
| protected MetaIndex | metaIndexThe meta index server. | 
| protected String[] | metaKeys | 
| protected String[] | qTermsquery terms of the current query | 
| protected Summariser | summariser | 
| protected Set<String> | summaryKeys | 
FILTER_ADJUSTED, FILTER_OK, FILTER_REMOVE| Constructor and Description | 
|---|
| Decorate() | 
| Modifier and Type | Method and Description | 
|---|---|
| protected boolean | checkControl(String control_name,
            SearchRequest srq) | 
| byte | filter(Manager m,
      SearchRequest q,
      ResultSet rs,
      int rank,
      int docid)Called for each result in the resultset, used to filter out unwanted results. | 
| protected Pattern | generateEmphasisPattern(String[] _qTerms)Creates a regular expression pattern to highlight query terms metadata. | 
| String | getInfo()Returns the name of the post processor. | 
| protected String[] | getMetadata(String[] metaKeys,
           int docid) | 
| protected String[][] | getMetadata(String[] metaKeys,
           int[] docids) | 
| void | new_query(Manager m,
         SearchRequest q,
         ResultSet rs)Called before the processing of a resultset using this PostFilter is applied. | 
| void | process(Manager manager,
       SearchRequest q)decoration at the postprocess stage. | 
protected static final String[] CONTROL_VALUE_DELIMS
protected LRUMap<Integer,String[]> metaCache
protected MetaIndex metaIndex
protected static final Pattern controlNonVisibleCharacters
protected static final StringTools.ESCAPE defaultEscape
protected Matcher controlNonVisibleCharactersMatcher
protected static final Pattern cleanQuery
protected Pattern highlight
protected String[] qTerms
protected gnu.trove.TObjectIntHashMap<String> keys
protected Map<String,StringTools.ESCAPE> escapeKeys
protected Summariser summariser
protected String[] metaKeys
public void new_query(Manager m, SearchRequest q, ResultSet rs)
new_query in interface PostFilterm - The manager controlling this queryq - The search request being processedrs - the resultset that is being iterated throughpublic byte filter(Manager m, SearchRequest q, ResultSet rs, int rank, int docid)
filter in interface PostFilterm - The manager controlling this queryq - The search request being processedrank - which array index (rank) in the resultset have we reacheddocid - The docid of the currently being procesed result.public void process(Manager manager, SearchRequest q)
protected Pattern generateEmphasisPattern(String[] _qTerms)
_qTerms - query termsprotected boolean checkControl(String control_name, SearchRequest srq)
Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow