Class SuggestionSearcher

Class Documentation

class SuggestionSearcher

A SuggestionSearcher is a object suggesting over titles of an Archive

A SuggestionSearcher is mainly used to create new SuggestionSearch Internaly, this is a wrapper around a SuggestionDataBase with may or may not include a Xapian index.

You should consider that all search operations are NOT threadsafe. It is up to you to protect your calls to avoid race competition. However, SuggestionSearcher (and subsequent classes) do not maintain a global/ share state You can create several Searchers and use them in different threads.

Public Functions

explicit SuggestionSearcher(const Archive &archive)

SuggestionSearcher constructor.

Construct a SuggestionSearcher on top of an archive.

Parameters:

archive – An archive to suggest on.

SuggestionSearcher(const SuggestionSearcher &other)
SuggestionSearcher &operator=(const SuggestionSearcher &other)
SuggestionSearcher(SuggestionSearcher &&other)
SuggestionSearcher &operator=(SuggestionSearcher &&other)
~SuggestionSearcher()
SuggestionSearch suggest(const std::string &query)

Create a SuggestionSearch for a specific query.

The search is made on the archive under the SuggestionSearcher.

Parameters:

query – The SuggestionQuery to search.

void setVerbose(bool verbose)

Set the verbosity of search operations.

Parameters:

verbose – The verbose mode to set