#include <search_index.hpp>
◆ SearchIndex()
| pulp::runtime::SearchIndex::SearchIndex |
( |
| ) |
|
|
default |
◆ build()
| void pulp::runtime::SearchIndex::build |
( |
std::vector< std::string > | items, |
|
|
const CancelToken & | cancel = {} ) |
Replace the indexed set.
Precomputes an ASCII-lowercased copy of each item for case-insensitive matching. Intended to run on a background thread for large libraries, so it polls cancel and returns early when signalled (the partially-built index must then be discarded, not used).
◆ empty()
| bool pulp::runtime::SearchIndex::empty |
( |
| ) |
const |
|
inline |
◆ item()
| const std::string & pulp::runtime::SearchIndex::item |
( |
std::size_t | i | ) |
const |
|
inline |
The original text of item i. Caller must ensure i < size().
◆ query()
Rank every item against query.
Periodically checks cancel; if cancellation is observed the scan returns early with whatever it has gathered so far (callers should discard a cancelled result). An empty query returns items in original order, bounded by max_results.
◆ size()
| std::size_t pulp::runtime::SearchIndex::size |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: