Class TRECDocnoOutputFormat
- java.lang.Object
-
- org.terrier.structures.outputformat.TRECDocnoOutputFormat
-
- All Implemented Interfaces:
OutputFormat
public class TRECDocnoOutputFormat extends java.lang.Object implements OutputFormat
Standard OutputFormat for writing TREC runs
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.Logger
logger
The logger used
-
Constructor Summary
Constructors Constructor Description TRECDocnoOutputFormat(Index _index)
Create a TRECDocnoOutputFormat using the specified index for looking up the docnos
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.String[]
obtainDocnos(java.lang.String metaIndexDocumentKey, SearchRequest q, ResultSet set)
method which extracts the docnos for the prescribed resultsetvoid
printResults(java.io.PrintWriter pw, SearchRequest q, java.lang.String method, java.lang.String iteration, int _RESULTS_LENGTH)
Prints the results for the given search request, using the specified destination.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.terrier.structures.outputformat.OutputFormat
contentType
-
-
-
-
Constructor Detail
-
TRECDocnoOutputFormat
public TRECDocnoOutputFormat(Index _index)
Create a TRECDocnoOutputFormat using the specified index for looking up the docnos
-
-
Method Detail
-
obtainDocnos
protected java.lang.String[] obtainDocnos(java.lang.String metaIndexDocumentKey, SearchRequest q, ResultSet set) throws java.io.IOException
method which extracts the docnos for the prescribed resultset- Throws:
java.io.IOException
-
printResults
public void printResults(java.io.PrintWriter pw, SearchRequest q, java.lang.String method, java.lang.String iteration, int _RESULTS_LENGTH) throws java.io.IOException
Prints the results for the given search request, using the specified destination.- Specified by:
printResults
in interfaceOutputFormat
- Parameters:
pw
- PrintWriter the destination where to save the results.q
- SearchRequest the object encapsulating the query and the results.- Throws:
java.io.IOException
-
-