Terrier Core

TRECQuery needs refactored

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 3.0
  • Fix Version/s: 3.0
  • Component/s: .applications, .structures
  • Description:
    Hide
    TRECQuery is the class responsible for extracting queries from a TREC topics file.
    It also has a sub-class called SingleLineTRECQuery for topics files in a different format.
    Both files assumes that all the queries from the files can be loaded in memory.

    However, for processing queries from a large query log, this seems unlikely.

    TRECQuery should be refactored, (and probably moved out of the structures package, where it doesn't belong). It should probably represent some Iterator interface instead.
    Show
    TRECQuery is the class responsible for extracting queries from a TREC topics file. It also has a sub-class called SingleLineTRECQuery for topics files in a different format. Both files assumes that all the queries from the files can be loaded in memory. However, for processing queries from a large query log, this seems unlikely. TRECQuery should be refactored, (and probably moved out of the structures package, where it doesn't belong). It should probably represent some Iterator interface instead.

Activity

Hide
Craig Macdonald added a comment - 08/Oct/09 7:00 PM
interface BatchOfQueries extends Iterator<String>
{
 //inherits: public boolean hasNext();
 //inherits: public String next();
 public String getQueryId();
}

question: interface or abstract class?
question: should this be an interface in TRECQuerying, since this is the only place it is used?

Show
Craig Macdonald added a comment - 08/Oct/09 7:00 PM
interface BatchOfQueries extends Iterator<String>
{
 //inherits: public boolean hasNext();
 //inherits: public String next();
 public String getQueryId();
}
question: interface or abstract class? question: should this be an interface in TRECQuerying, since this is the only place it is used?
Hide
Craig Macdonald added a comment - 23/Nov/09 11:45 AM

Resolved. Added a QuerySource interface in TRECQuerying. Refactored TRECQuery to use interface, and deprecated older methods.

Show
Craig Macdonald added a comment - 23/Nov/09 11:45 AM Resolved. Added a QuerySource interface in TRECQuerying. Refactored TRECQuery to use interface, and deprecated older methods.

People

Dates

  • Created:
    08/Oct/09 6:58 PM
    Updated:
    05/Mar/10 5:10 PM
    Resolved:
    23/Nov/09 11:45 AM