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 class
ParallelTRECQuerying.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 void
close()
Closes the used structures.protected void
createManager()
Create a querying manager.protected void
finishedQueries()
After finishing with a batch of queries, close the result filejava.io.PrintWriter
getResultFile(java.lang.String predefinedName)
Returns a PrintWriter used to store the results.static void
main(java.lang.String[] args)
java.lang.String
processQueries()
Performs the matching using the specified weighting model from the setup and possibly a combination of evidence mechanism.protected void
processQueryAndWrite(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:AbstractQuerying
Create a querying manager.- Overrides:
createManager
in classTRECQuerying
-
processQueryAndWrite
protected void processQueryAndWrite(java.lang.String queryId, java.lang.String query)
Description copied from class:TRECQuerying
According to the given parameters, it sets up the correct matching class and performs retrieval for the given query.- Overrides:
processQueryAndWrite
in classTRECQuerying
- Parameters:
queryId
- the identifier of the query to process.query
- the query to process.
-
finishedQueries
protected void finishedQueries()
Description copied from class:TRECQuerying
After finishing with a batch of queries, close the result file- Overrides:
finishedQueries
in classTRECQuerying
-
getResultFile
public java.io.PrintWriter getResultFile(java.lang.String predefinedName)
Description copied from class:TRECQuerying
Returns a PrintWriter used to store the results.- Overrides:
getResultFile
in 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:TRECQuerying
Performs 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:
processQueries
in classTRECQuerying
- Returns:
- String the filename that the results have been written to
-
close
public void close()
Description copied from class:TRECQuerying
Closes the used structures.- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classTRECQuerying
-
main
public static void main(java.lang.String[] args)
-
-