QueryDatapublic class QueryData extends Object This class holds parameters for a query benchmark. |
Fields Summary |
---|
public String | idBenchmark id | public Query | qLucene query | public boolean | reopenIf true, re-open index reader before benchmark. | public boolean | warmupIf true, warm-up the index reader before searching by sequentially
retrieving all documents from index. | public boolean | retrieveIf true, actually retrieve documents returned in Hits. |
Methods Summary |
---|
public static org.apache.lucene.benchmark.stats.QueryData[] | getAll(org.apache.lucene.search.Query[] queries)Prepare a list of benchmark data, using all possible combinations of
benchmark parameters.
Vector vqd = new Vector();
for (int i = 0; i < queries.length; i++) {
for (int r = 1; r >= 0; r--) {
for (int w = 1; w >= 0; w--) {
for (int t = 0; t < 2; t++) {
QueryData qd = new QueryData();
qd.id="qd-" + i + r + w + t;
qd.reopen = Constants.BOOLEANS[r].booleanValue();
qd.warmup = Constants.BOOLEANS[w].booleanValue();
qd.retrieve = Constants.BOOLEANS[t].booleanValue();
qd.q = queries[i];
vqd.add(qd);
}
}
}
}
return (QueryData[])vqd.toArray(new QueryData[0]);
| public static java.lang.String | getLabels()Short legend for interpreting toString() output.
return "# Query data: R-reopen, W-warmup, T-retrieve, N-no";
| public java.lang.String | toString()
return id + " " + (reopen ? "R" : "NR") + " " + (warmup ? "W" : "NW") +
" " + (retrieve ? "T" : "NT") + " [" + q.toString() + "]";
|
|