Class ParallelTRECQuerying
- java.lang.Object
-
- org.terrier.applications.AbstractQuerying
-
- org.terrier.applications.batchquerying.TRECQuerying
-
- org.terrier.applications.batchquerying.ParallelTRECQuerying
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable
public class ParallelTRECQuerying extends TRECQuerying implements java.io.Closeable
An instance of TRECQuerying that will invoke multiple threads concurrently
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classParallelTRECQuerying.Command-
Nested classes/interfaces inherited from class org.terrier.applications.AbstractQuerying
AbstractQuerying.AbstractQueryingCommand
-
-
Field Summary
-
Fields inherited from class org.terrier.applications.batchquerying.TRECQuerying
BATCHRETRIEVE_COMMAND, BATCHRETRIEVE_PROP_PREFIX, defaultQEModel, DUMP_SETTINGS, ITERATION, logger, method, mModel, printer, queryingManager, querySource, random, removeQueryPeriods, resultFile, resultFileRaw, RESULTS_LENGTH, resultsCache, resultsFilename
-
Fields inherited from class org.terrier.applications.AbstractQuerying
controls, indexref, matchingCount, matchopQl
-
-
Constructor Summary
Constructors Constructor Description ParallelTRECQuerying()ParallelTRECQuerying(boolean _queryexpansion)Deprecated.ParallelTRECQuerying(IndexRef i)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Closes the used structures.protected voidcreateManager()Create a querying manager.protected voidfinishedQueries()After finishing with a batch of queries, close the result filejava.io.PrintWritergetResultFile(java.lang.String predefinedName)Returns a PrintWriter used to store the results.static voidmain(java.lang.String[] args)java.lang.StringprocessQueries()Performs the matching using the specified weighting model from the setup and possibly a combination of evidence mechanism.protected voidprocessQueryAndWrite(java.lang.String queryId, java.lang.String query)According to the given parameters, it sets up the correct matching class and performs retrieval for the given query.-
Methods inherited from class org.terrier.applications.batchquerying.TRECQuerying
getIndexRef, getManager, getNextQueryCounter, getOutputFormat, getQueryParser, getRandomQueryCounter, getResultsCache, getSequentialQueryCounter, getTopicsParser, initSearchRequestModification, intialise, loadIndex, preQueryingSearchRequestModification, printSettings, processQueries, processQuery, setTopicsParser, startingBatchOfQueries
-
Methods inherited from class org.terrier.applications.AbstractQuerying
controls
-
-
-
-
Constructor Detail
-
ParallelTRECQuerying
public ParallelTRECQuerying()
-
ParallelTRECQuerying
public ParallelTRECQuerying(IndexRef i)
-
ParallelTRECQuerying
@Deprecated public ParallelTRECQuerying(boolean _queryexpansion)
Deprecated.
-
-
Method Detail
-
createManager
protected void createManager()
Description copied from class:AbstractQueryingCreate a querying manager.- Overrides:
createManagerin classTRECQuerying
-
processQueryAndWrite
protected void processQueryAndWrite(java.lang.String queryId, java.lang.String query)Description copied from class:TRECQueryingAccording to the given parameters, it sets up the correct matching class and performs retrieval for the given query.- Overrides:
processQueryAndWritein classTRECQuerying- Parameters:
queryId- the identifier of the query to process.query- the query to process.
-
finishedQueries
protected void finishedQueries()
Description copied from class:TRECQueryingAfter finishing with a batch of queries, close the result file- Overrides:
finishedQueriesin classTRECQuerying
-
getResultFile
public java.io.PrintWriter getResultFile(java.lang.String predefinedName)
Description copied from class:TRECQueryingReturns a PrintWriter used to store the results.- Overrides:
getResultFilein classTRECQuerying- Parameters:
predefinedName- java.lang.String a non-standard prefix for the result file.- Returns:
- a handle used as a destination for storing results.
-
processQueries
public java.lang.String processQueries()
Description copied from class:TRECQueryingPerforms the matching using the specified weighting model from the setup and possibly a combination of evidence mechanism. It parses the file with the queries creates the file of results, and for each query, gets the relevant documents, scores them, and outputs the results to the result file.Queries
Queries are parsed from file, specified by the trec.topics property (comma delimited)- Overrides:
processQueriesin classTRECQuerying- Returns:
- String the filename that the results have been written to
-
close
public void close()
Description copied from class:TRECQueryingCloses the used structures.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classTRECQuerying
-
main
public static void main(java.lang.String[] args)
-
-