Class TRECDocidOutputFormat

  • All Implemented Interfaces:
    OutputFormat

    public class TRECDocidOutputFormat
    extends java.lang.Object
    implements OutputFormat
    OutputFormat for writing TREC runs where the docnos are NOT looked up, but instead the (integer, internal) docids are recorded in the .res file.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static org.slf4j.Logger logger
      The logger used
    • Constructor Summary

      Constructors 
      Constructor Description
      TRECDocidOutputFormat​(Index index)
      Creates a new TRECDocidOutputFormat.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void 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
    • Field Detail

      • logger

        protected static final org.slf4j.Logger logger
        The logger used
    • Constructor Detail

      • TRECDocidOutputFormat

        public TRECDocidOutputFormat​(Index index)
        Creates a new TRECDocidOutputFormat. The index object is ignored
    • Method Detail

      • 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 interface OutputFormat
        Parameters:
        pw - PrintWriter the destination where to save the results.
        q - SearchRequest the object encapsulating the query and the results.
        Throws:
        java.io.IOException