Closed mjordan closed 1 year ago
I've tried to make the API resemble the original as much as possible (as much as Rust lifetimes allow).
Milli only exposes add_documents
, where the default behavior is replacing existing documents with identical IDs with a newer version, see https://github.com/meilisearch/milli/blob/758b4acea7cecd689650bee65949b49cf09ddaa3/milli/src/update/index_documents/mod.rs#L69
Because of this, right now, you can "replace" documents but not "update" them.
In a future version, I'll expose these optional keyword arguments via:
Index.add_documents(..., update_method=IndexDocumentsMethod.ReplaceDocuments)
so that you can select IndexDocumentsMethod.ReplaceDocuments or IndexDocumentsMethod.UpdateDocuments depending on the intended behavior.
@AlexAltea can you create a new release for PyPI? This change is not present in the current release. Thanks!
Will there be an
update_documents
method or will replacing withadd_documents
be the preferred way?