|
xapian-core
2.0.0
|
Some terms which form a positional sub-query. More...
Collaboration diagram for Terms: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_synonym_phrase_query (State *state) 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 1349 of file queryparser_internal.cc.
|
inlineexplicitprivate |
Definition at line 1418 of file queryparser_internal.cc.
|
inline |
Definition at line 1429 of file queryparser_internal.cc.
|
inline |
Add an unstemmed Term object to this Terms object.
Definition at line 1436 of file queryparser_internal.cc.
References term.
Referenced by Term::as_positional_unbroken(), and yy_reduce().
|
inline |
Definition at line 1450 of file queryparser_internal.cc.
Referenced by yy_reduce().
|
inline |
Convert to a Xapian::Query * using OP_PHRASE to implement ADJ.
Definition at line 1510 of file queryparser_internal.cc.
Referenced by yy_reduce().
|
inline |
Convert to a Xapian::Query * using OP_NEAR.
Definition at line 1500 of file queryparser_internal.cc.
Referenced by yy_reduce().
|
inlineprivate |
Convert to a query using the given operator and window size.
Definition at line 1385 of file queryparser_internal.cc.
References add_to_query(), Xapian::Query::get_type(), Xapian::Query::LEAF_MATCH_ALL, query(), and term.
|
inline |
Convert to a Xapian::Query * using adjacent OP_PHRASE.
Definition at line 1455 of file queryparser_internal.cc.
Referenced by yy_reduce().
Convert to a Xapian::Query * using adjacent OP_PHRASE.
Definition at line 1460 of file queryparser_internal.cc.
References State::get_database(), name, Xapian::Query::OP_SYNONYM, pos, prefix_needs_colon(), Xapian::Database::synonyms_begin(), Xapian::Database::synonyms_end(), and term.
Referenced by yy_reduce().
Factory function - ensures heap allocation.
Definition at line 1425 of file queryparser_internal.cc.
References State::flags.
Referenced by yy_reduce().
|
inlineprivate |
Definition at line 1375 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 1373 of file queryparser_internal.cc.
|
private |
Definition at line 1350 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 1368 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 1357 of file queryparser_internal.cc.