xapian-core
1.4.26
|
Some terms which form a positional sub-query. More...
Public Member Functions | |
~Terms () | |
void | add_positional_term (Term *term) |
Add an unstemmed Term object to this Terms object. More... | |
void | adjust_window (size_t alternative_window) |
Query * | as_phrase_query () const |
Convert to a Xapian::Query * using adjacent OP_PHRASE. More... | |
Query * | as_near_query () const |
Convert to a Xapian::Query * using OP_NEAR. More... | |
Query * | as_adj_query () const |
Convert to a Xapian::Query * using OP_PHRASE to implement ADJ. More... | |
Static Public Member Functions | |
static Terms * | create (State *state) |
Factory function - ensures heap allocation. More... | |
Private Member Functions | |
Query | opwindow_subq (Query::op op, const vector< Query > &v, Xapian::termcount w) const |
Query * | as_opwindow_query (Query::op op, Xapian::termcount w_delta) const |
Convert to a query using the given operator and window size. More... | |
Terms (bool no_pos) | |
Private Attributes | |
vector< Term * > | terms |
size_t | window |
Window size. More... | |
bool | uniform_prefixes |
Keep track of whether the terms added all have the same list of prefixes. More... | |
const vector< string > * | prefixes |
The list of prefixes of the terms added. More... | |
Some terms which form a positional sub-query.
Definition at line 1058 of file queryparser_internal.cc.
|
inlineexplicitprivate |
Definition at line 1123 of file queryparser_internal.cc.
|
inline |
Definition at line 1134 of file queryparser_internal.cc.
|
inline |
Add an unstemmed Term object to this Terms object.
Definition at line 1141 of file queryparser_internal.cc.
References Term::field_info, Term::need_positions(), and FieldInfo::prefixes.
Referenced by Term::as_positional_unbroken(), and yy_reduce().
|
inline |
Definition at line 1155 of file queryparser_internal.cc.
Referenced by yy_reduce().
|
inline |
Convert to a Xapian::Query * using OP_PHRASE to implement ADJ.
Definition at line 1175 of file queryparser_internal.cc.
Referenced by yy_reduce().
|
inline |
Convert to a Xapian::Query * using OP_NEAR.
Definition at line 1165 of file queryparser_internal.cc.
Referenced by yy_reduce().
|
inlineprivate |
Convert to a query using the given operator and window size.
Definition at line 1094 of file queryparser_internal.cc.
References add_to_query().
|
inline |
Convert to a Xapian::Query * using adjacent OP_PHRASE.
Definition at line 1160 of file queryparser_internal.cc.
Referenced by yy_reduce().
Factory function - ensures heap allocation.
Definition at line 1130 of file queryparser_internal.cc.
References State::flags.
Referenced by yy_reduce().
|
inlineprivate |
Definition at line 1084 of file queryparser_internal.cc.
|
private |
The list of prefixes of the terms added.
This will be NULL if the terms have different prefixes.
Definition at line 1082 of file queryparser_internal.cc.
|
private |
Definition at line 1059 of file queryparser_internal.cc.
|
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 1077 of file queryparser_internal.cc.
|
private |
Window size.
size_t(-1) means don't use positional info (so an OP_AND query gets created).
Definition at line 1066 of file queryparser_internal.cc.