|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.querying.Request
public class Request
Request SearchRequest contains the details of the search engine for one query, including the query itself, the resultset, and the controls. Controls set application specific parameters, which often load post proceses, and postfilters, or set matching parameter. These are fundamentally, the names of the modules to be used for each stage of a query:
Field Summary | |
---|---|
protected java.util.Map<java.lang.String,java.lang.String> |
Control
Controls are querying stage flags and variables. |
protected boolean |
EmptyQuery
does the query have any terms. |
protected Index |
index
index will not be passed across RMI |
protected MatchingQueryTerms |
matchingTerms
This is an aggregated form of the query terms, suitable for matching, which requires term frequencies for each term. |
protected int |
numOfDocsAfterFiltering
The number of documents returned after performing post filtering |
protected java.lang.String |
originalQuery
The query text, before applying any pre-processsing |
protected Query |
q
This contains the parsed syntax tree of the query, as generated by the Antlr parser |
protected java.lang.String |
QueryID
QueryID - used by TREC querying and output format for supporting relevance assessments |
protected ResultSet |
resultSet
This is the resultset of the query. |
Constructor Summary | |
---|---|
Request()
|
Method Summary | |
---|---|
void |
addMatchingModel(java.lang.String MatchingModelName,
java.lang.String WeightingModelName)
Set the matching model and weighting model that the Manager should use for this query |
java.lang.String |
getControl(java.lang.String Name)
Returns the value of the control. |
java.util.Map<java.lang.String,java.lang.String> |
getControlHashtable()
Get the entire hashtable used for storing controls for this query |
Index |
getIndex()
Returns the index to be used for this query |
java.lang.String |
getMatchingModel()
returns the name of the matching model that should be used for retrieval |
MatchingQueryTerms |
getMatchingQueryTerms()
Return the MatchingQueryTerms object to use for matching |
int |
getNumberOfDocumentsAfterFiltering()
returns the number of documents in the result set after applying post filters. |
java.lang.String |
getOriginalQuery()
gets the string of the original query, before applying any pre-processing. |
Query |
getQuery()
Get the Query syntax tree |
java.lang.String |
getQueryID()
Returns the query id as set by setQueryID(String). |
ResultSet |
getResultSet()
Returns the resultset generated by the query. |
long |
getStartedProcessingTime()
returns the time when the processing of the request started. |
java.lang.String |
getWeightingModel()
returns the name of the weighting model that should be used for retrieval |
boolean |
isEmpty()
Set if the query input had no terms. |
void |
setControl(java.lang.String Name,
java.lang.String Value)
Set a control named to have value Value. |
void |
setControls(java.util.Map<java.lang.String,java.lang.String> controls)
Use this hashtable to store controls and their values in |
void |
setEmpty(boolean in)
force this query to be seen as containing (no) terms. |
void |
setIndex(Index _index)
Set the index to be used for this query |
void |
setMatchingQueryTerms(MatchingQueryTerms mqts)
Used by runPreProcessing after the query tree has been aggregated into a list of terms, each containing frequencies. |
void |
setNumberOfDocumentsAfterFiltering(int n)
sets the number of documents in the result set, after applying post filters. |
void |
setOriginalQuery(java.lang.String _q)
sets the string of the original query, before applying any pre-processing |
void |
setQuery(Query _q)
Set the query to be a parsed Query syntax tree, as generated by the Terrier query parser |
void |
setQueryID(java.lang.String qid)
Set a unique identifier for this query request. |
void |
setResultSet(ResultSet results)
Set the result set returned by this object to be this results. |
void |
setStartedProcessingTime(long _startedProcessingTime)
sets the time when the processing of the request started |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean EmptyQuery
protected java.lang.String QueryID
protected java.util.Map<java.lang.String,java.lang.String> Control
protected Query q
protected java.lang.String originalQuery
protected int numOfDocsAfterFiltering
protected ResultSet resultSet
protected MatchingQueryTerms matchingTerms
protected transient Index index
Constructor Detail |
---|
public Request()
Method Detail |
---|
public void addMatchingModel(java.lang.String MatchingModelName, java.lang.String WeightingModelName)
addMatchingModel
in interface SearchRequest
MatchingModelName
- the String class name that should be usedWeightingModelName
- the String class name that should be usedpublic void setQuery(Query _q)
setQuery
in interface SearchRequest
_q
- The Query object syntax treepublic void setQueryID(java.lang.String qid)
setQueryID
in interface SearchRequest
qid
- the unique string identifierpublic void setIndex(Index _index)
public Index getIndex()
public void setControl(java.lang.String Name, java.lang.String Value)
setControl
in interface SearchRequest
Name
- the name of the control to set the value of.Value
- the value that the control should take.public java.lang.String getControl(java.lang.String Name)
getControl
in interface SearchRequest
public ResultSet getResultSet()
getResultSet
in interface SearchRequest
public java.lang.String getQueryID()
getQueryID
in interface SearchRequest
public Query getQuery()
getQuery
in interface SearchRequest
public boolean isEmpty()
isEmpty
in interface SearchRequest
public java.lang.String getWeightingModel()
public java.lang.String getMatchingModel()
public void setResultSet(ResultSet results)
public java.util.Map<java.lang.String,java.lang.String> getControlHashtable()
public void setEmpty(boolean in)
in
- set to true for query to be seen empty.public void setMatchingQueryTerms(MatchingQueryTerms mqts)
mqts
- The matchingqueryterms to use for matching.public MatchingQueryTerms getMatchingQueryTerms()
public void setControls(java.util.Map<java.lang.String,java.lang.String> controls)
public void setOriginalQuery(java.lang.String _q)
setOriginalQuery
in interface SearchRequest
public java.lang.String getOriginalQuery()
getOriginalQuery
in interface SearchRequest
public void setNumberOfDocumentsAfterFiltering(int n)
setNumberOfDocumentsAfterFiltering
in interface SearchRequest
public int getNumberOfDocumentsAfterFiltering()
getNumberOfDocumentsAfterFiltering
in interface SearchRequest
public long getStartedProcessingTime()
getStartedProcessingTime
in interface SearchRequest
public void setStartedProcessingTime(long _startedProcessingTime)
setStartedProcessingTime
in interface SearchRequest
_startedProcessingTime
- the time obtained from a call
to System.currentTimeMillis()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |