Class 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
    • Constructor Detail

      • ParallelTRECQuerying

        public ParallelTRECQuerying()
      • ParallelTRECQuerying

        public ParallelTRECQuerying​(IndexRef i)
      • ParallelTRECQuerying

        @Deprecated
        public ParallelTRECQuerying​(boolean _queryexpansion)
        Deprecated.
    • Method Detail

      • 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 class TRECQuerying
        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 class TRECQuerying
      • 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 class TRECQuerying
        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 class TRECQuerying
        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 interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Overrides:
        close in class TRECQuerying
      • main

        public static void main​(java.lang.String[] args)