org.cdlib.xtf.textEngine
Class QueryProcessor

Object
  extended by QueryProcessor
Direct Known Subclasses:
DefaultQueryProcessor

public abstract class QueryProcessor
extends Object

Takes a QueryRequest, rewrites the queries if necessary to remove stop- words and form bi-grams, then consults the index(es), and produces a QueryResult.

Author:
Martin Haye

Constructor Summary
QueryProcessor()
           
 
Method Summary
abstract  QueryResult processRequest(QueryRequest req)
          Takes a query request and handles searching the index and forming the results.
 void resetCache()
          Optional method: hint to the query processor to clear any cached index data, so that recently indexed documents will appear in search results.
 void setIndexWarmer(IndexWarmer warmer)
          Optional method: set the background warmer for indexes.
 void setXtfHome(String homeDir)
          Optional method: set the XTF home directory (used for background warming in the default query processor.)
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryProcessor

public QueryProcessor()
Method Detail

processRequest

public abstract QueryResult processRequest(QueryRequest req)
                                    throws IOException
Takes a query request and handles searching the index and forming the results.

Parameters:
req - The request to process
Returns:
Zero or more document hits
Throws:
IOException

resetCache

public void resetCache()
Optional method: hint to the query processor to clear any cached index data, so that recently indexed documents will appear in search results.


setXtfHome

public void setXtfHome(String homeDir)
Optional method: set the XTF home directory (used for background warming in the default query processor.)


setIndexWarmer

public void setIndexWarmer(IndexWarmer warmer)
Optional method: set the background warmer for indexes.