Template Class NearestNeighborIndex

Class Documentation

template<NearestNeighborBackendConcept Backend>
class NearestNeighborIndex

Public Types

using backend_type = Backend
using config_type = typename Backend::config_type

Public Functions

NearestNeighborIndex() = default
inline NearestNeighborIndex(NearestNeighborIndex &&other) noexcept
inline NearestNeighborIndex &operator=(NearestNeighborIndex &&other) noexcept
NearestNeighborIndex(const NearestNeighborIndex&) = delete
NearestNeighborIndex &operator=(const NearestNeighborIndex&) = delete
inline ~NearestNeighborIndex()
inline common::Result<void> close()
inline bool is_open() const noexcept
inline common::Result<bool> contains(std::string_view id) const
inline common::Result<Item> get_item(std::string_view id) const
inline common::Result<void> upsert_item(const Item &item)
inline common::Result<void> erase_item(std::string_view id)
inline common::Result<std::vector<SearchHit>> search(std::span<const float> query, SearchOptions options = {}) const
inline common::Result<std::vector<Key>> list_keys() const
inline backend_type &backend() noexcept
inline const backend_type &backend() const noexcept

Public Static Functions

static inline common::Result<void> create(const config_type &cfg)
static inline common::Result<void> destroy(const config_type &cfg)
static inline common::Result<NearestNeighborIndex> open(const config_type &cfg)