| 
    xapian-core
    1.4.29
    
   | 
 
Soaktest generating lots of random queries. More...
#include <config.h>#include "soaktest/soaktest.h"#include "soaktest/soaktest_queries.h"#include <xapian.h>#include "backendmanager.h"#include "str.h"#include "testrunner.h"#include "testsuite.h"#include "testutils.h"#include <list>
 Include dependency graph for soaktest_queries.cc:Go to the source code of this file.
Classes | |
| struct | QueryBuilderEnv | 
| The environment used by the steps when building a query.  More... | |
| class | QueryBuilder | 
| Random query builder.  More... | |
Typedefs | |
| typedef void(* | QueryStep) (QueryBuilderEnv &) | 
Functions | |
| static void | builddb_queries1 (Xapian::WritableDatabase &db, const string &arg) | 
| Make a database in which docs have the fields:  More... | |
| static void | push_leaf_N (QueryBuilderEnv &env) | 
| Push a leaf query on field N onto the list of query pieces.  More... | |
| static void | combine_OR (QueryBuilderEnv &env) | 
| Combine some queries with OR.  More... | |
| static void | combine_AND (QueryBuilderEnv &env) | 
| Combine some queries with AND.  More... | |
| static void | combine_XOR (QueryBuilderEnv &env) | 
| Combine some queries with XOR.  More... | |
| static void | combine_NOT (QueryBuilderEnv &env) | 
| Combine some queries with AND_NOT.  More... | |
| DEFINE_TESTCASE (queries1, writable &&!remote &&!inmemory) | |
Soaktest generating lots of random queries.
Definition in file soaktest_queries.cc.
| typedef void(* QueryStep) (QueryBuilderEnv &) | 
Definition at line 90 of file soaktest_queries.cc.
      
  | 
  static | 
Make a database in which docs have the fields:
Definition at line 46 of file soaktest_queries.cc.
References Xapian::WritableDatabase::add_document(), Xapian::Document::add_term(), Xapian::WritableDatabase::commit(), randint(), and Xapian::Internal::str().
Referenced by DEFINE_TESTCASE().
      
  | 
  static | 
Combine some queries with AND.
The queries are removed from the list and the combined query is added to the end.
Definition at line 117 of file soaktest_queries.cc.
References QueryBuilderEnv::maxchildren, Xapian::Query::OP_AND, QueryBuilderEnv::pick(), QueryBuilderEnv::pieces, and randint().
Referenced by QueryBuilder::QueryBuilder().
      
  | 
  static | 
Combine some queries with AND_NOT.
The queries are removed from the list and the combined query is added to the end.
Definition at line 143 of file soaktest_queries.cc.
References Xapian::Query::OP_AND_NOT, QueryBuilderEnv::pick(), and QueryBuilderEnv::pieces.
Referenced by QueryBuilder::QueryBuilder().
      
  | 
  static | 
Combine some queries with OR.
The queries are removed from the list and the combined query is added to the end.
Definition at line 104 of file soaktest_queries.cc.
References QueryBuilderEnv::maxchildren, Xapian::Query::OP_OR, QueryBuilderEnv::pick(), QueryBuilderEnv::pieces, and randint().
Referenced by QueryBuilder::QueryBuilder().
      
  | 
  static | 
Combine some queries with XOR.
The queries are removed from the list and the combined query is added to the end.
Definition at line 130 of file soaktest_queries.cc.
References QueryBuilderEnv::maxchildren, Xapian::Query::OP_XOR, QueryBuilderEnv::pick(), QueryBuilderEnv::pieces, and randint().
Referenced by QueryBuilder::QueryBuilder().
| DEFINE_TESTCASE | ( | queries1 | , | 
| writable &&!remote &&! | inmemory | ||
| ) | 
Definition at line 204 of file soaktest_queries.cc.
References backendmanager, builddb_queries1(), BackendManager::get_database(), Xapian::Database::get_doccount(), Xapian::Enquire::get_mset(), initrand(), QueryBuilder::make_query(), mset_range_is_same(), query(), seed, Xapian::Enquire::set_query(), Xapian::Internal::str(), TEST, and tout.
      
  | 
  static | 
Push a leaf query on field N onto the list of query pieces.
Definition at line 93 of file soaktest_queries.cc.
References QueryBuilderEnv::maxtermsperfield, QueryBuilderEnv::pieces, randint(), and Xapian::Internal::str().
Referenced by QueryBuilder::QueryBuilder().