Module faiss::index

source ·
Expand description

Index interface and native implementations.

This module hosts the vital Index trait, through which index building and searching is made. It also contains index_factory, a generic function through which the user can retrieve most of the available index implementations. A very typical usage scenario of this crate is to create the index through this function, but some statically verified index types are available as well.

Modules

Interface and implementation to Flat index type.
GPU Index implementation
Module for the ID map wrapper.
Index I/O functions
Interface and implementation to Locality-Sensitive Hashing (LSH) index type.

Structs

The outcome of an index assign operation.
Native implementation of a Faiss Index running on the CPU.
The outcome of an index range search operation.
The outcome of an index search operation.

Traits

Trait for a Faiss index that can be safely searched over multiple threads. Operations which do not modify the index are given a method taking an immutable reference. This is not the default for every index type because some implementations (such as the ones running on the GPU) do not allow concurrent searches.
Trait for Faiss index types known to be running on the CPU.
Trait for Faiss index types which can be built from a pointer to a native implementation.
Interface for a Faiss index. Most methods in this trait match the ones in the native library, whereas some others serve as getters to the index’ parameters.
Sub-trait for native implementations of a Faiss index.

Functions

Use the index factory to create a native instance of a Faiss index, for d-dimensional vectors. description should follow the exact guidelines as the native Faiss interface (see the Faiss wiki for examples).

Type Definitions

Primitive data type for identifying a vector in an index.