SearchResult¶
SearchResult¶
Constructor¶
Constructor |
Description |
---|---|
Search Result |
Attributes¶
API |
Description |
---|---|
Iterate the search result. |
|
Return the Hits corresponding to the nth query. |
|
Return the number of query of search result. |
APIs References¶
-
class
pymilvus.
SearchResult
(query_result=None)¶ -
iter
(self)¶ Iterate the Search Result. Every iteration returns a Hits corresponding to a query.
-
self
[
item]
¶ Return the Hits corresponding to the nth query.
- Return Hits
The hits corresponding to the nth(item) query.
-
len
(self) → int¶ Return the number of query of Search Result.
- Return int
The number of query of search result.
-
Hits¶
Attributes¶
API |
Description |
---|---|
Iterate the hits object. |
|
Return the hit record to the query. |
|
Return the number of hit records. |
|
Return the ids of hit records. |
|
Return the distances of hit records. |
APIs References¶
-
class
pymilvus.
Hits
(hits)¶ -
iter
(self)¶ Iterate the Hits object. Every iteration returns a Hit which represent a record corresponding to the query.
-
self
[
item]
¶ Return the kth Hit corresponding to the query.
- Return Hit
The kth specified by item Hit corresponding to the query.
-
len
(self) → int¶ Return the number of hit record.
- Return int
The number of hit record.
-
property
ids
¶ Return the ids of all hit record.
- Return list[int]
The ids of all hit record.
-
property
distances
¶ Return the distances of all hit record.
- Return list[float]
The distances of all hit record.
-
Hit¶
Attributes¶
API |
Description |
---|---|
Return the id of hit record. |
|
Return the distance of hit record. |
|
Return the score of hit record. |
|
Return the information of hit record. |
APIs References¶
-
class
pymilvus.
Hit
(hit)¶ -
property
id
¶ Return the id of the hit record.
- Return int
The id of the hit record.
-
property
distance
¶ Return the distance between the hit record and the query.
- Return float
The distance of the hit record.
-
property
score
¶ Return the calculated score of the hit record, now the score is equal to distance.
- Return float
The score of the hit record.
-
str
(self)¶ Return the information of hit record.
- Return str
The information of hit record.
-
property