CLucene - a full-featured, c++ search engine
API Documentation
#include <BooleanQuery.h>
Classes | |
| class | BooleanWeight |
Public Types | |
| typedef lucene::util::CLVector < BooleanClause *, lucene::util::Deletor::Object < BooleanClause > > | ClausesType |
Public Member Functions | |
| BooleanQuery () | |
| Constructs an empty boolean query. | |
| ~BooleanQuery () | |
| const TCHAR * | getQueryName () const |
| void | add (Query *query, const bool required, const bool prohibited) |
| Adds a clause to a boolean query. | |
| void | add (Query *query, const bool deleteQuery, const bool required, const bool prohibited) |
| void | getClauses (BooleanClause **clauses) const |
| Copies the clauses of this query into the array. | |
| BooleanClause ** | getClauses () const |
| size_t | getClauseCount () const |
| Give client code access to clauses.size() so we know how large the array returned by getClauses is. | |
| void | add (BooleanClause *clause) |
| Adds a clause to a boolean query. | |
| Query * | rewrite (lucene::index::IndexReader *reader) |
| Expert: called to re-write queries into primitive queries. | |
| Query * | clone () const |
| Returns a clone of this query. | |
| bool | equals (Query *o) const |
| TCHAR * | toString (const TCHAR *field) const |
| Prints a user-readable version of this query. | |
| size_t | hashCode () const |
| Returns a hash code value for this object. | |
Static Public Member Functions | |
| static const TCHAR * | getClassName () |
| static size_t | getMaxClauseCount () |
| Return the maximum number of clauses permitted, 1024 by default. | |
| static void | setMaxClauseCount (size_t maxClauseCount) |
| Set the maximum number of clauses permitted. | |
Protected Member Functions | |
| Weight * | _createWeight (Searcher *searcher) |
| Expert: Constructs an appropriate Weight implementation for this query. | |
| BooleanQuery (const BooleanQuery &clone) | |
| typedef lucene:: util ::CLVector<BooleanClause*,lucene:: util ::Deletor::Object<BooleanClause> > lucene::search::BooleanQuery::ClausesType |
| lucene::search::BooleanQuery::BooleanQuery | ( | const BooleanQuery & | clone | ) | [protected] |
| lucene::search::BooleanQuery::BooleanQuery | ( | ) |
Constructs an empty boolean query.
| lucene::search::BooleanQuery::~BooleanQuery | ( | ) |
| Weight* lucene::search::BooleanQuery::_createWeight | ( | Searcher * | searcher | ) | [inline, protected, virtual] |
Expert: Constructs an appropriate Weight implementation for this query.
Only implemented by primitive queries, which re-write to themselves. This is an Internal function
Reimplemented from lucene::search::Query.
References _CLNEW.
| void lucene::search::BooleanQuery::add | ( | BooleanClause * | clause | ) |
Adds a clause to a boolean query.
| void lucene::search::BooleanQuery::add | ( | Query * | query, | |
| const bool | deleteQuery, | |||
| const bool | required, | |||
| const bool | prohibited | |||
| ) |
| void lucene::search::BooleanQuery::add | ( | Query * | query, | |
| const bool | required, | |||
| const bool | prohibited | |||
| ) | [inline] |
Adds a clause to a boolean query.
Clauses may be:
required which means that documents which do not match this sub-query will not match the boolean query; prohibited which means that documents which do match this sub-query will not match the boolean query; or It is an error to specify a clause as both required and prohibited.
| Query* lucene::search::BooleanQuery::clone | ( | ) | const [virtual] |
Returns a clone of this query.
Implements lucene::search::Query.
| bool lucene::search::BooleanQuery::equals | ( | Query * | o | ) | const |
| static const TCHAR* lucene::search::BooleanQuery::getClassName | ( | ) | [static] |
| size_t lucene::search::BooleanQuery::getClauseCount | ( | ) | const |
Give client code access to clauses.size() so we know how large the array returned by getClauses is.
| BooleanClause** lucene::search::BooleanQuery::getClauses | ( | ) | const |
| void lucene::search::BooleanQuery::getClauses | ( | BooleanClause ** | clauses | ) | const |
Copies the clauses of this query into the array.
The array must be at least as long as getClauseCount() If you want to use the clauses, make sure you null terminate it.
| static size_t lucene::search::BooleanQuery::getMaxClauseCount | ( | ) | [static] |
Return the maximum number of clauses permitted, 1024 by default.
Attempts to add more than the permitted number of clauses cause TooManyClauses to be thrown.
| const TCHAR* lucene::search::BooleanQuery::getQueryName | ( | ) | const [virtual] |
Implements lucene::search::Query.
| size_t lucene::search::BooleanQuery::hashCode | ( | ) | const [virtual] |
Returns a hash code value for this object.
Implements lucene::search::Query.
| Query* lucene::search::BooleanQuery::rewrite | ( | lucene::index::IndexReader * | reader | ) | [virtual] |
Expert: called to re-write queries into primitive queries.
Reimplemented from lucene::search::Query.
| static void lucene::search::BooleanQuery::setMaxClauseCount | ( | size_t | maxClauseCount | ) | [static] |
Set the maximum number of clauses permitted.
| TCHAR* lucene::search::BooleanQuery::toString | ( | const TCHAR * | field | ) | const [virtual] |
Prints a user-readable version of this query.
Implements lucene::search::Query.