#include <query.h>
Collaboration diagram for Xapian::Query:
Public Types | |
enum | op { OP_AND, OP_OR, OP_AND_NOT, OP_XOR, OP_AND_MAYBE, OP_FILTER, OP_NEAR, OP_PHRASE, OP_ELITE_SET = 10 } |
Enum of possible query operations. More... | |
Public Member Functions | |
Query (const Query ©me) | |
Copy constructor. | |
Query & | operator= (const Query ©me) |
Assignment. | |
Query () | |
Default constructor: makes an empty query which matches no documents. | |
~Query () | |
Destructor. | |
Query (const std::string &tname_, Xapian::termcount wqf_=1, Xapian::termpos pos_=0) | |
A query consisting of a single term. | |
Query (Query::op op_, const Query &left, const Query &right) | |
A query consisting of two subqueries, opp-ed together. | |
Query (Query::op op_, const std::string &left, const std::string &right) | |
A query consisting of two termnames opp-ed together. | |
template<class Iterator> | |
Query (Query::op op_, Iterator qbegin, Iterator qend, Xapian::termcount parameter=0) | |
Combine a number of Xapian::Query-s with the specified operator. | |
Query (Query::op op_, Xapian::Query q) | |
Apply the specified operator to a single Xapian::Query object. | |
Xapian::termcount | get_length () const |
Get the length of the query, used by some ranking formulae. | |
TermIterator | get_terms_begin () const |
Return a Xapian::TermIterator returning all the terms in the query, in order of termpos. | |
TermIterator | get_terms_end () const |
Return a Xapian::TermIterator to the end of the list of terms in the query. | |
bool | empty () const |
Test is the query is empty (i.e. | |
XAPIAN_DEPRECATED (bool is_empty() const) | |
std::string | get_description () const |
Returns a string representing the query. | |
template<class Iterator> | |
Query (Query::op op_, Iterator qbegin, Iterator qend, termcount parameter) | |
Public Attributes | |
Xapian::Internal::RefCntPtr< Internal > | internal |
Classes | |
class | Internal |
Internal class, implementing most of Xapian::Query. More... |
Queries are represented as a tree of objects.
|
|
Copy constructor.
|
|
Default constructor: makes an empty query which matches no documents. Also useful for defining a Query object to be assigned to later. An exception will be thrown if an attempt is made to use an undefined query when building up a composite query. |
|
Destructor.
|
|
A query consisting of a single term.
|
|
A query consisting of two subqueries, opp-ed together.
|
|
A query consisting of two termnames opp-ed together.
|
|
Combine a number of Xapian::Query-s with the specified operator. The Xapian::Query objects are specified with begin and end iterators. AND, OR, NEAR and PHRASE can take any number of subqueries. Other operators take exactly two subqueries. The iterators may be to Xapian::Query objects, pointers to Xapian::Query objects, or termnames (std::string-s). For NEAR and PHRASE, a window size can be specified in parameter. For ELITE_SET, the elite set size can be specified in parameter. |
|
Apply the specified operator to a single Xapian::Query object.
|
|
Test is the query is empty (i.e. was constructed using the default ctor or with an empty iterator ctor). |
|
Returns a string representing the query. Introspection method. |
|
Get the length of the query, used by some ranking formulae. This value is calculated automatically - if you want to override it you can pass a different value to Enquire::set_query(). |
|
Return a Xapian::TermIterator returning all the terms in the query, in order of termpos. If multiple terms have the same term position, their order is unspecified. Duplicates (same term and termpos) will be removed. |
|
Return a Xapian::TermIterator to the end of the list of terms in the query.
|
|
Assignment.
|
|
|