#include <omenquire.h>
Public Methods | |
OmEnquire (const OmDatabase &databases, OmErrorHandler *errorhandler_=0) | |
Create an OmEnquire object. More... | |
~OmEnquire () | |
Close the OmEnquire object. More... | |
void | set_query (const OmQuery &query_) |
Set the query to run. More... | |
const OmQuery & | get_query () |
Get the query which has been set. More... | |
void | set_weighting_scheme (const OmWeight &weight_) |
Set the weighting scheme to use for queries. More... | |
OmMSet | get_mset (om_doccount first, om_doccount maxitems, const OmRSet *omrset=0, const OmSettings *moptions=0, const OmMatchDecider *mdecider=0) const |
Get (a portion of) the match set for the current query. More... | |
OmESet | get_eset (om_termcount maxitems, const OmRSet &omrset, bool exclude_query_terms=true, bool use_exact_termfreq=false, double k=1.0, const OmExpandDecider *edecider=0) const |
Get the expand set for the given rset. More... | |
OmESet | get_eset (om_termcount maxitems, const OmRSet &omrset, const OmExpandDecider *edecider) const |
Get the expand set for the given rset. More... | |
OmESet | get_eset (om_termcount, const OmRSet &, OmSettings *, OmExpandDecider *dummy=0) const |
OmTermIterator | get_matching_terms_begin (om_docid did) const |
Get terms which match a given document, by document id. More... | |
OmTermIterator | get_matching_terms_end (om_docid did) const |
End iterator corresponding to get_matching_terms_begin(). More... | |
OmTermIterator | get_matching_terms_begin (const OmMSetIterator &it) const |
Get terms which match a given document, by match set item. More... | |
OmTermIterator | get_matching_terms_end (const OmMSetIterator &it) const |
End iterator corresponding to get_matching_terms_begin(). More... | |
void | register_match_decider (const std::string &name, const OmMatchDecider *mdecider=NULL) |
Register an OmMatchDecider. More... | |
std::string | get_description () const |
Introspection method. More... | |
Public Attributes | |
Internal * | internal |
Databases are usually opened lazily, so exceptions may not be thrown where you would expect them to be. You should catch OmError exceptions when calling any method in OmEnquire.
OmInvalidArgumentError | will be thrown if an invalid argument is supplied, for example, an unknown database type. |
OmOpeningError | will be thrown if the database cannot be opened (for example, a required file cannot be found). |
|
Create an OmEnquire object. This specification cannot be changed once the OmEnquire is opened: you must create a new OmEnquire object to access a different database, or set of databases.
|
|
Close the OmEnquire object. This frees all resources associated with the OmEnquire object, such as handles on the databases used. As a result, any object which refers to these databases, such as an OmDocument, will become invalid after the destruction of the object, and must not be used subsequently. |
|
Introspection method.
|
|
Get the expand set for the given rset.
|
|
Get the expand set for the given rset.
|
|
Get terms which match a given document, by match set item. This method returns the terms in the current query which match the given document. If the underlying database has suitable support, using this call (rather than passing an om_docid) will enable the system to ensure that the correct data is returned, and that the document has not been deleted or changed since the query was performed.
|
|
Get terms which match a given document, by document id. This method returns the terms in the current query which match the given document. It is possible for the document to have been removed from the database between the time it is returned in an mset, and the time that this call is made. If possible, you should specify an OmMSetIterator instead of a om_docid, since this will enable database backends with suitable support to prevent this occurring. Note that a query does not need to have been run in order to make this call.
|
|
End iterator corresponding to get_matching_terms_begin().
|
|
End iterator corresponding to get_matching_terms_begin().
|
|
Get (a portion of) the match set for the current query.
|
|
Get the query which has been set. This is only valid after set_query() has been called.
|
|
Register an OmMatchDecider.
|
|
Set the query to run.
|
|
Set the weighting scheme to use for queries.
|