Skip to content

Milvus _get_docs_by_ids cannot deal with duplicated id #857

@AnneYang720

Description

@AnneYang720

MRE is below:

from docarray import Document, DocumentArray

with DocumentArray(
    storage='milvus',
    config={'n_dim': 3,},
) as da:
    da.extend([Document(id=f'{i}',) for i in range(10)])

ids = ['1', '2', '3', '1', '2', '3']
print(da[ids]) # this will print <DocumentArray (length=3) at xxx>
print(da[ids][:, 'id']) # this will print ['1', '2', '3']
print(len(da[ids])) # this will print 3

The possible reason is the milvus api in _get_docs_by_ids.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions