|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.querying.QueryExpansion
public class QueryExpansion
Implements automatic query expansion as PostFilter that is applied to the resultset after 1st-time matching. Controls
Field Summary | |
---|---|
protected java.util.Map<java.lang.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<BitIndexPointer> |
directIndex
The direct index used for retrieval. |
protected DocumentIndex |
documentIndex
The document index used for retrieval. |
protected InvertedIndex |
invertedIndex
The inverted index used for retrieval. |
java.lang.String |
lastExpandedQuery
|
protected Index |
lastIndex
|
protected Lexicon<java.lang.String> |
lexicon
An instance of Lexicon class. |
protected static org.apache.log4j.Logger |
logger
|
protected MetaIndex |
metaIndex
|
static java.lang.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 Summary | |
---|---|
QueryExpansion()
The default constructor of QueryExpansion. |
Method Summary | |
---|---|
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 |
java.lang.String |
getInfo()
Returns the name of the used query expansion model. |
QueryExpansionModel |
getQueryExpansionModel(java.lang.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final org.apache.log4j.Logger logger
public static final java.lang.String NAMESPACE_QEMODEL
protected java.util.Map<java.lang.String,QueryExpansionModel> Cache_QueryExpansionModel
protected DocumentIndex documentIndex
protected MetaIndex metaIndex
protected InvertedIndex invertedIndex
protected Lexicon<java.lang.String> lexicon
protected PostingIndex<BitIndexPointer> directIndex
protected CollectionStatistics collStats
protected QueryExpansionModel QEModel
protected FeedbackSelector selector
protected Index lastIndex
public java.lang.String lastExpandedQuery
Constructor Detail |
---|
public QueryExpansion()
Method Detail |
---|
public void setQueryExpansionModel(QueryExpansionModel _QEModel)
_QEModel
- QueryExpansionModel The query expansion model to be used.public void expandQuery(MatchingQueryTerms query, Request rq) throws java.io.IOException
query
- MatchingQueryTerms the query terms of
the original query.rq
- the Request thus far, giving access to the query and the result set
java.io.IOException
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(java.lang.String Name)
Name
- the name of the query expansion model to load.public java.lang.String getInfo()
getInfo
in interface Process
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |