xapian-core
1.4.26
|
Random query builder. More...
Public Member Functions | |
QueryBuilder (unsigned int maxtermsperfield_, unsigned int maxchildren_, unsigned int maxsteps_) | |
Xapian::Query | make_query () |
Build a random query. More... | |
Private Attributes | |
vector< QueryStep > | options |
The possible steps. More... | |
QueryBuilderEnv | env |
The environment for the build steps. More... | |
unsigned int | maxsteps |
Maximum number of steps to take when building a query. More... | |
Random query builder.
Definition at line 153 of file soaktest_queries.cc.
|
inline |
Definition at line 164 of file soaktest_queries.cc.
References combine_AND(), combine_NOT(), combine_OR(), combine_XOR(), and push_leaf_N().
|
inline |
Build a random query.
This performs a random number of steps, each of which modifies the QueryBuilderEnv by picking a random one of the options.
After the steps have been performed, the first item on the list in QueryBuilderEnv is popped and returned.
Definition at line 190 of file soaktest_queries.cc.
References QueryBuilderEnv::pop(), and randint().
Referenced by DEFINE_TESTCASE().
|
private |
The environment for the build steps.
Definition at line 158 of file soaktest_queries.cc.
|
private |
Maximum number of steps to take when building a query.
Definition at line 161 of file soaktest_queries.cc.
|
private |
The possible steps.
Definition at line 155 of file soaktest_queries.cc.