Public Member Functions | |
TermList () | |
void | add_positional_term (Term *term) |
Add an unstemmed Term object to this TermList object. | |
void | adjust_window (size_t alternative_window) |
Query * | as_opwindow_query (Query::op op, Xapian::termcount w_delta) const |
Convert to a query using the given operator and window size. | |
Query * | as_phrase_query () const |
Convert to a Xapian::Query * using adjacent OP_PHRASE. | |
Query * | as_near_query () const |
Convert to a Xapian::Query * using OP_NEAR. | |
Query * | as_adj_query () const |
Convert to a Xapian::Query * using OP_PHRASE to implement ADJ. | |
void | destroy () |
Provide a way to explicitly delete an object of this class. | |
Protected Member Functions | |
~TermList () | |
Protected destructor, so an auto-variable of this type is a compile-time error - you must allocate this object with new. | |
Private Attributes | |
vector< Term * > | terms |
size_t | window |
bool | uniform_prefixes |
Keep track of whether the terms added all have the same list of prefixes. | |
list< string > | prefixes |
The list of prefixes of the terms added. |
Definition at line 1196 of file queryparser_internal.cc.
TermList::TermList | ( | ) | [inline] |
Definition at line 1217 of file queryparser_internal.cc.
TermList::~TermList | ( | ) | [inline, protected] |
Protected destructor, so an auto-variable of this type is a compile-time error - you must allocate this object with new.
Definition at line 1301 of file queryparser_internal.cc.
References TermGroup::terms.
void TermList::add_positional_term | ( | Term * | term | ) | [inline] |
Add an unstemmed Term object to this TermList object.
Definition at line 1220 of file queryparser_internal.cc.
References Term::need_positions(), Term::prefixes, and TermGroup::terms.
Referenced by yy_reduce().
void TermList::adjust_window | ( | size_t | alternative_window | ) | [inline] |
Query* TermList::as_opwindow_query | ( | Query::op | op, | |
Xapian::termcount | w_delta | |||
) | const [inline] |
Convert to a query using the given operator and window size.
Definition at line 1236 of file queryparser_internal.cc.
References add_to_query(), TermGroup::terms, and w().
Query* TermList::as_phrase_query | ( | ) | const [inline] |
Convert to a Xapian::Query * using adjacent OP_PHRASE.
Definition at line 1268 of file queryparser_internal.cc.
Referenced by yy_reduce().
Query* TermList::as_near_query | ( | ) | const [inline] |
Convert to a Xapian::Query * using OP_NEAR.
Definition at line 1273 of file queryparser_internal.cc.
References w().
Referenced by yy_reduce().
Query* TermList::as_adj_query | ( | ) | const [inline] |
Convert to a Xapian::Query * using OP_PHRASE to implement ADJ.
Definition at line 1283 of file queryparser_internal.cc.
References w().
Referenced by yy_reduce().
void TermList::destroy | ( | ) | [inline] |
Provide a way to explicitly delete an object of this class.
The destructor is protected to prevent auto-variables of this type.
Definition at line 1295 of file queryparser_internal.cc.
vector<Term *> TermList::terms [private] |
Reimplemented in InMemoryTermList, and VectorTermList.
Definition at line 1197 of file queryparser_internal.cc.
size_t TermList::window [private] |
Definition at line 1198 of file queryparser_internal.cc.
bool TermList::uniform_prefixes [private] |
Keep track of whether the terms added all have the same list of prefixes.
If so, we'll build a set of phrases, one using each prefix. This works around the limitation that a phrase cannot have multiple components which are "OR" combinations of terms, but is also probably what users expect: ie, if a user specifies a phrase in a field, and that field maps to multiple prefixes, the user probably wants a phrase returned with all terms having one of those prefixes, rather than a phrase comprised of terms with differing prefixes.
Definition at line 1209 of file queryparser_internal.cc.
list<string> TermList::prefixes [private] |
The list of prefixes of the terms added.
This will be empty if the terms have different prefixes.
Definition at line 1214 of file queryparser_internal.cc.