public class QueryExpansion extends Object implements PostProcess
Modifier and Type | Field and Description |
---|---|
protected Map<String,QueryExpansionModel> |
Cache_QueryExpansionModel
Caching the query expansion models that have been
created so far.
|
protected CollectionStatistics |
collStats
The statistics of the index
|
protected PostingIndex<?> |
directIndex
The direct index used for retrieval.
|
protected DocumentIndex |
documentIndex
The document index used for retrieval.
|
protected PostingIndex<?> |
invertedIndex
The inverted index used for retrieval.
|
String |
lastExpandedQuery |
protected Index |
lastIndex |
protected Lexicon<String> |
lexicon
An instance of Lexicon class.
|
protected static org.apache.log4j.Logger |
logger |
protected MetaIndex |
metaIndex |
static String |
NAMESPACE_QEMODEL
The default namespace of query expansion model classes.
|
protected QueryExpansionModel |
QEModel
The query expansion model used.
|
protected FeedbackSelector |
selector
The process by which to select feedback documents
|
Constructor and Description |
---|
QueryExpansion()
The default constructor of QueryExpansion.
|
Modifier and Type | Method and Description |
---|---|
void |
expandQuery(MatchingQueryTerms query,
Request rq)
This method implements the functionality of expanding a query.
|
protected ExpansionTerms |
getExpansionTerms()
load the expansion terms, as per the property qe.expansion.terms.class.
|
protected FeedbackSelector |
getFeedbackSelector(Request rq)
load the feedback selector, based on the property qe.feedback.selector
|
protected Index |
getIndex(Manager m)
For easier sub-classing of which index the query expansion comes from
|
String |
getInfo()
Returns the name of the used query expansion model.
|
QueryExpansionModel |
getQueryExpansionModel(String Name)
Obtain the query expansion model for QE to use.
|
void |
process(Manager manager,
SearchRequest q)
Runs the actual query expansion
|
void |
setQueryExpansionModel(QueryExpansionModel _QEModel)
Set the used query expansion model.
|
protected static final org.apache.log4j.Logger logger
public static final String NAMESPACE_QEMODEL
protected Map<String,QueryExpansionModel> Cache_QueryExpansionModel
protected DocumentIndex documentIndex
protected MetaIndex metaIndex
protected PostingIndex<?> invertedIndex
protected PostingIndex<?> directIndex
protected CollectionStatistics collStats
protected QueryExpansionModel QEModel
protected FeedbackSelector selector
protected Index lastIndex
public String lastExpandedQuery
public QueryExpansion()
public void setQueryExpansionModel(QueryExpansionModel _QEModel)
_QEModel
- QueryExpansionModel The query expansion model to be used.public void expandQuery(MatchingQueryTerms query, Request rq) throws IOException
query
- MatchingQueryTerms the query terms of
the original query.rq
- the Request thus far, giving access to the query and the result setIOException
protected Index getIndex(Manager m)
protected ExpansionTerms getExpansionTerms()
protected FeedbackSelector getFeedbackSelector(Request rq)
public void process(Manager manager, SearchRequest q)
process
in interface Process
manager
- The manager instance handling this search session.q
- the current query being processedProcess.process(org.terrier.querying.Manager,org.terrier.querying.SearchRequest)
public QueryExpansionModel getQueryExpansionModel(String Name)
Name
- the name of the query expansion model to load.Terrier 4.0. Copyright © 2004-2014 University of Glasgow