if (!new File(queryFile).exists()) {
System.err.println("Error: " + queryFile + " doesn't exist!");
System.exit(-1);
}
IndriQueryParams queryParams = new IndriQueryParams();
queryParams.ParseXMLQueryFile(queryFile);
String group = cmdline.hasOption(GROUP_OPTION) ? cmdline.getOptionValue(GROUP_OPTION) : null;
String token = cmdline.hasOption(TOKEN_OPTION) ? cmdline.getOptionValue(TOKEN_OPTION) : null;
TrecSearchThriftClient client = new TrecSearchThriftClient(cmdline.getOptionValue(HOST_OPTION),
Integer.parseInt(cmdline.getOptionValue(PORT_OPTION)), group, token);
Queries queries = queryParams.getQueries();
Query query;
while((query = queries.getNextQuery()) != null) {
List<TResult> results = client.search(query.getQueryString(),
Long.parseLong(query.getMetadataField("lastrel")), 1000);
int i = 1;