[TR-66] TRECQuery needs refactored Created: 08/Oct/09  Updated: 05/Mar/10  Resolved: 23/Nov/09

Status: Resolved
Project: Terrier Core
Component/s: .applications, .structures
Affects Version/s: 3.0
Fix Version/s: 3.0

Type: Bug Priority: Minor
Reporter: Craig Macdonald Assignee: Craig Macdonald
Resolution: Fixed  
Labels: None

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.

Comment by Craig Macdonald [ 08/Oct/09 ]
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?

Comment by Craig Macdonald [ 23/Nov/09 ]

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

Generated at Sat Aug 24 06:28:16 BST 2019 using JIRA 7.1.1#71004-sha1:d6b2c0d9b7051e9fb5e4eb8ce177ca56d91d7bd8.