-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Labels
help wantedExtra attention is neededExtra attention is neededtype: bugSomething isn't workingSomething isn't workingvibe coding: hard
Description
Describe the bug
scenario:
# insert data
collection.add(ids='id1', document='', metadata='{"category": "AI", "score": 95, "tags": ["ml", "ai"], "version": 1}'
# query data by _collection_get
collection.get(where={"tags": {"$eq": "ml"}})We expect to get one row but got nothing.
Here we have the same behavior with #83 that we use JSON_EXTRACT to extract the value of the specific key and compare it with the input value (which is "ml").
How to fix?
We can also use JSON_OVERLAP instead of JSON_EXTRACT to handle this issue.
Environment
No
Fast reproduce steps
import pyseekdb
client = pyseekdb.Client()
collection = client.get_or_create_collection('test_eq')
collection.upsert(ids='id1', documents='', metadata='{"category": "AI", "score": 95, "tags": ["ml", "ai"], "version": 1}')
results = collection.get(where={"tags": {"$eq": "ml"}})
print(str(results)) # we expect to get 1 row but got nothingExpected behavior
No response
Actual behavior
No response
Additional context
No response
coderabbitai
Metadata
Metadata
Assignees
Labels
help wantedExtra attention is neededExtra attention is neededtype: bugSomething isn't workingSomething isn't workingvibe coding: hard