save_index

Function save_index 

Source
pub fn save_index<T: Serialize, P: AsRef<Path>>(
    index: &T,
    path: P,
) -> Result<()>
Expand description

Save an index to a JSON file

The index must implement Serialize. This works with all index types:

  • VectorSearchIndex
  • HnswIndex
  • IvfPqIndex
  • HybridIndex
  • ColbertIndex