Class Searcher¶
Defined in File search.h
Class Documentation¶
-
class Searcher¶
A Searcher is a object fulltext searching a set of Archives
A Searcher is mainly used to create new
SearchInternaly, this is mainly a wrapper around a Xapian database.All search (at exception of SearchIterator) operation are thread safe. You can freely create several Search from one Searcher and use them in different threads.
Public Functions
-
explicit Searcher(const std::vector<Archive> &archives)¶
Searcher constructor.
Construct a searcher on top of several archives (multi search).
- Parameters:
archives – A list(vector) of archives to search on.
-
explicit Searcher(const Archive &archive)¶
Searcher constructor.
Construct a searcher on top of on archive.
- Parameters:
archive – A archive to search on.
-
~Searcher()¶
-
Searcher &addArchive(const Archive &archive)¶
Add a archive to the searcher.
Adding a archive to a searcher do not invalidate already created search.
-
Search search(const Query &query)¶
Create a search for a specific query.
The search is made on all archives added to the Searcher.
- Parameters:
query – The Query to search.
- Throws:
std::runtime_error – if the searcher does not have a valid FT database.
-
void setVerbose(bool verbose)¶
Set the verbosity of search operations.
- Parameters:
verbose – The verbose mode to set
-
explicit Searcher(const std::vector<Archive> &archives)¶