| Top |
XapianQuery is a class that represents a tree of terms and operations that is applied by XapianEnquire to match documents in a database.
Typically, you'll want to use XapianQueryParser instead of building a XapianQuery directly.
XapianQuery *
xapian_query_new (void);
Creates a new, empty XapianQuery instance.
XapianQuery *
xapian_query_new_for_term (const char *term);
Creates a new XapianQuery for the given term
.
XapianQuery * xapian_query_new_for_pair (XapianQueryOp op,XapianQuery *a,XapianQuery *b);
Creates a new XapianQuery using two XapianQuery instances
and an op
between the two.
XapianQuery * xapian_query_new_for_value (XapianQueryOp op,unsigned int slot,const char *value);
Creates a new XapianQuery that matches values from a document value slot.
op |
a XapianQueryOp value, currently either |
|
slot |
the slot number to get the value from |
|
value |
the value to compare |
XapianQuery * xapian_query_new_for_terms_pair (XapianQueryOp op,const char *a,const char *b);
Creates a new XapianQuery for the two given terms, using the given operator.
XapianQuery *
xapian_query_new_from_posting_source (XapianPostingSource *posting_source);
Creates a new XapianQuery from a posting source.
Since: 1.2
XapianQuery *
xapian_query_new_from_string (const char *data);
Creates a new XapianQuery from its normal form.
XapianQuery *
xapian_query_new_match_all (void);
Creates a new XapianQuery that will match all documents in the database.
Since: 1.2
gboolean
xapian_query_is_empty (XapianQuery *query);
Checks whether query
is empty.
unsigned int
xapian_query_get_length (XapianQuery *query);
Retrieves the length of the query.
char *
xapian_query_get_description (XapianQuery *query);
Retrieves a description of query
, typically used for debugging.
char *
xapian_query_serialise (XapianQuery *query);
Serialises query
into a normal form that can be used
with xapian_query_new_from_string().
Operators for XapianQuery.
|
filters if both sub-queries are satisfied |
||
|
filters if either sub-queries are satisfied |
||
|
filters if only the left sub-query is satisfied but not the right |
||
|
filters if either sub-query is satisfied but not both |
||
|
filters if left sub-query is satisfied but uses the weights for both |
||
|
filters as |
||
|
filters if occurrances of a list of terms appear within a specified window of positions |
||
|
filters if occurrances of a list of terms appear both within a specified window of positions and als in the specified order |
||
|
filters by a range of values |
||
|
scales the weight of a sub-query by the specified factor |
||
|
picks the best N sub-queries and
combines them with |
||
|
filters a document value using a greater than or equal test |
||
|
filters a document value using a less than or equal test |
||
|
treats a set of sub-queries as synonyms |
||
|
pick the maximum weight of any subquery (Since: 1.4.0) |
||
|
wildcard expansion (Since: 1.4.0) |