Function faiss::index::index_factory
source · pub fn index_factory<D>(
d: u32,
description: D,
metric: MetricType
) -> Result<IndexImpl>where
D: AsRef<str>,
Expand description
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).
Error
This function returns an error if the description contains any byte with the value \0
(since
it cannot be converted to a C string), or if the internal index factory operation fails.