Skip to content

query operator $exists does not work correctly with tags #911

@marcosbodio

Description

@marcosbodio

Describe the bug
The query operator $exists does not work correctly with tags.

To Reproduce
Steps to reproduce the behavior:

from docarray import DocumentArray, Document

da = DocumentArray([Document(id=f'd{x}', x=x) for x in range(10)])
print(f"documents with key 'x' in tags: {da.find({'tags__x': {'$exists': True}})[:, 'id']}")

Expected behavior
The code above should print

documents with key 'x' in tags: ['d0', 'd1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9']

but instead it prints

documents with key 'x' in tags: ['d1', 'd2', 'd3', 'd4', 'd5', 'd6', 'd7', 'd8', 'd9']

Desktop

  • OS: macOS Ventura 13.0.1 (22A400)
  • Browser Firefox
  • Version Firefox 107.0.1 (64-bit)

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions