Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix search result #1748

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pymilvus/client/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ def get(self, field_name: str) -> Any:
return self.fields.get(field_name)

def __str__(self) -> str:
return f"pk: {self.id}, distance: {self.distance}, entity: {self.fields}"
return f"id: {self.id}, distance: {self.distance}, entity: {self.fields}"

__repr__ = __str__

Expand Down
5 changes: 3 additions & 2 deletions pymilvus/orm/future.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

from typing import Any

from pymilvus.client.abstract import SearchResult
from pymilvus.grpc_gen import schema_pb2

from .mutation import MutationResult
Expand Down Expand Up @@ -43,8 +44,8 @@ def done(self):


class _EmptySearchFuture:
def result(self) -> schema_pb2.SearchResultData:
return schema_pb2.SearchResultData()
def result(self) -> SearchResult:
return SearchResult(schema_pb2.SearchResultData())

def cancel(self) -> None:
pass
Expand Down
Loading