full_text_search.h defines an abstract interface for all different kinds of full test search providers. The following operations are defined:
The class IFullTextSearch is the interface of the search provider. It is returned by a provider specific create function, which is outside the scope of this specification. It provides public member functions for the individual operations.
class IFullTextSearch {
public:
virtual ~IFullTextSearch() {}
virtual class IFullTextSearchStart * Start(class UTask * user, class IDatabase * database, const char * reference) = 0;
virtual class IFullTextSearchAdd * Add(class UTask * user, const char * text, ulong64 reference) = 0;
virtual class IFullTextSearchExec * Exec(class UTask * user, const char * input, ulong64 more, const char * select, const char * join, unsigned count) = 0;
};
The start function is used to start the initialization task. Any database tables needed by the search provider internally will be initialzed.
It returns a pointer to the class IFullTextSearchStart, which can be used in the TaskComplete and TaskFailed callbacks to identify the request to which these callbacks are related.
Starts the task of adding text to the search.
It returns a pointer to the class IFullTextSearchAdd, which can be used in the TaskComplete and TaskFailed callbacks to identify the request to which these callbacks are related.
Starts the execution of a search.
A class IFullTextSearchExec is returned. For each result a TaskProgress is called.
class IFullTextSearchExec : public ITask {
public:
virtual ulong64 GetId() = 0;
virtual void Next() = 0;
virtual int GetInt(const char * columnName) = 0;
virtual dword GetUInt(const char * columnName) = 0;
virtual long64 GetLong64(const char * columnName) = 0;
virtual ulong64 GetULong64(const char * columnName) = 0;
virtual bool GetBool(const char * columnName) = 0;
virtual double GetDouble(const char * columnName) = 0;
virtual const char * GetString(const char * columnName) = 0;
virtual const char * GetStringWithNull(const char * columnName) = 0;
virtual size_t GetDataSize(const char * columnName) = 0;
virtual const byte * GetDataValue(const char * columnName) = 0;
};