
Public Member Functions | |
| Terms () | |
| void | add_positional_term (Term *term) |
| Add an unstemmed Term object to this Terms object. | |
| void | adjust_window (size_t alternative_window) |
| 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 | |
| ~Terms () | |
| Protected destructor, so an auto-variable of this type is a compile-time error - you must allocate this object with new. | |
Private Member Functions | |
| Query * | as_opwindow_query (Query::op op, Xapian::termcount w_delta) const |
| Convert to a query using the given operator and window size. | |
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. | |
| const list< string > * | prefixes |
| The list of prefixes of the terms added. | |
Definition at line 1501 of file queryparser_internal.cc.
| Terms::Terms | ( | ) | [inline] |
Definition at line 1556 of file queryparser_internal.cc.
| Terms::~Terms | ( | ) | [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 1611 of file queryparser_internal.cc.
References terms.
| void Terms::add_positional_term | ( | Term * | term | ) | [inline] |
Add an unstemmed Term object to this Terms object.
Definition at line 1559 of file queryparser_internal.cc.
References Term::need_positions(), Term::prefix_info, prefixes, PrefixInfo::prefixes, terms, and uniform_prefixes.
Referenced by Term::as_positional_cjk_term(), and yy_reduce().
| void Terms::adjust_window | ( | size_t | alternative_window | ) | [inline] |
Definition at line 1573 of file queryparser_internal.cc.
References window.
Referenced by yy_reduce().
| Query* Terms::as_adj_query | ( | ) | const [inline] |
Convert to a Xapian::Query * using OP_PHRASE to implement ADJ.
Definition at line 1593 of file queryparser_internal.cc.
References as_opwindow_query(), and window.
Referenced by yy_reduce().
| Query* Terms::as_near_query | ( | ) | const [inline] |
Convert to a Xapian::Query * using OP_NEAR.
Definition at line 1583 of file queryparser_internal.cc.
References as_opwindow_query(), and window.
Referenced by yy_reduce().
| Query* Terms::as_opwindow_query | ( | Query::op | op, | |
| Xapian::termcount | w_delta | |||
| ) | const [inline, private] |
Convert to a query using the given operator and window size.
Definition at line 1522 of file queryparser_internal.cc.
References add_to_query(), Term::make_term(), Term::pos, prefixes, terms, and uniform_prefixes.
Referenced by as_adj_query(), as_near_query(), and as_phrase_query().
| Query* Terms::as_phrase_query | ( | ) | const [inline] |
Convert to a Xapian::Query * using adjacent OP_PHRASE.
Definition at line 1578 of file queryparser_internal.cc.
References as_opwindow_query().
Referenced by yy_reduce().
| void Terms::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 1605 of file queryparser_internal.cc.
const list<string>* Terms::prefixes [private] |
The list of prefixes of the terms added.
This will be NULL if the terms have different prefixes.
Definition at line 1519 of file queryparser_internal.cc.
Referenced by add_positional_term(), and as_opwindow_query().
vector<Term *> Terms::terms [private] |
Definition at line 1502 of file queryparser_internal.cc.
Referenced by add_positional_term(), as_opwindow_query(), and ~Terms().
bool Terms::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: i.e., 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 1514 of file queryparser_internal.cc.
Referenced by add_positional_term(), and as_opwindow_query().
size_t Terms::window [private] |
Definition at line 1503 of file queryparser_internal.cc.
Referenced by adjust_window(), as_adj_query(), and as_near_query().