-
Notifications
You must be signed in to change notification settings - Fork 391
Open
Labels
kind/bugSomething isn't workingSomething isn't working
Description
Is there an existing issue for this?
- I have searched the existing issues
Describe the bug
the code:
from pymilvus import connections, Collection
connections.connect("default")
collection = Collection("K_DB")
results = collection.query(
expr="",
output_fields=["id", "vector"],
limit=3,
)
print("results", results[-1])
# out results {'id': 7391398968791437314, 'vector': []}
for i in results:
print(i)
Expected Behavior
The expected correct vector result:
{'id': 7391398968791437314, 'vector': [-0.03041940927505493, ......]}
I will add logic in pymilvus/client/types.py:1197 within HybridExtraList.__getitem__ to convert negative indices to positive indices, ensuring the correct results are retrieved.
def __getitem__(self, index: Union[int, slice]):
...
self._pre_materialize_float_vector()
if index < 0:
index = len(self) + index
...
return rowSteps/Code To Reproduce behavior
Environment details
- Hardware/Softward conditions (OS, CPU, GPU, Memory):
- Method of installation (Docker, or from source):
- Milvus version (v0.3.1, or v0.4.0):
- Milvus configuration (Settings you made in `server_config.yaml`):Anything else?
No response
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working