Skip to content
This repository was archived by the owner on Sep 9, 2026. It is now read-only.
This repository was archived by the owner on Sep 9, 2026. It is now read-only.

feat: support update for inmemory index #1725

Closed

Description

@jupyterjazz

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.

Activity

  1. converted this from a draft issue on Jul 24, 2023
  2. self-assigned this
    on Jul 24, 2023
  3. moved this from Todo/Features to In Progress in DocArray backlogon Jul 24, 2023
  4. linked a pull request that will close this issuefeat: update for inmemory index #1724on Jul 24, 2023
  5. moved this from In Progress to Done in DocArray backlogon Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions