InMemoryExactNNIndex does not support update
from docarray.index import InMemoryExactNNIndex
from docarray import BaseDoc
class MyDoc(BaseDoc):
text: str
data = [MyDoc(text=f'text {i}') for i in range(10)]
doc_index = InMemoryExactNNIndex[MyDoc]()
doc_index.index(data)
assert doc_index.num_docs() == 10
for doc in data:
doc.text = doc.text + 'smth'
doc_index.index(data)
assert doc_index.num_docs() == 10
Instead of updating the same 10 docs, it would extend existing docs with the same 10 docs.
InMemoryExactNNIndex does not support update
Instead of updating the same 10 docs, it would extend existing docs with the same 10 docs.