pub fn apply_update(index: Index, update: IndexUpdate<'_>) -> Result<Index>Expand description
Produce a new Index reflecting update applied to index,
reusing the existing codec and centroids.
§Errors
Propagates PlaidError::Tensor from the batched
nearest-centroid lookup used to re-encode upserted documents.
§Panics
Panics if any upserted document’s tokens.len() disagrees with
n_tokens * index.params.dim, or if upserts contains two
entries with the same doc_id.