Docs Menu
SearchResult()
This is the constructor method to create a SearchResult.
Invocation
SearchResult(query_result=None)
Return
A SearchResult object.
Attributes
Property | Description |
---|---|
iter(self) | Iterate the search result. Each iteration returns a Hits corresponding to a query. |
self[item] | Return the Hits corresponding to the nth query |
len(self) | Return the nq of search result |
Hit()
This is the constructor method to create a Hit object.
Invocation
Hit(hit)
Return
A Hit object.
Attributes
Property | Description |
---|---|
ids | Return the primary keys of the hit results |
distances | Return the distance between the hit record and the query |
score | Return the score of the hit record. The score is set equal to distance. |
str | Return the information of hit record |
Hits()
This is the constructor method to create a Hits object.
Invocation
Hits(hits)
Return
A Hits object.
Attributes
Property | Description |
---|---|
iter(self) | Iterate the Hits object. Each iteration returns a Hit which represent a record corresponding to the query. |
self[item] | Return the kth Hit corresponding to the query |
len(self) | Return the number of hit record |
ids | Return the primary keys of all search results |
distances | Return the distances of all hit record |