SearchResult

SearchResult

Constructor

Constructor

Description

SearchResult()

Search Result

Attributes

API

Description

iter(self)

Iterate the search result.

self[item]

Return the Hits corresponding to the nth query.

len(self)

Return the number of query of search result.

APIs References

class pymilvus_orm.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

Constructor

Constructor

Description

Hits()

Search result about specific query.

Attributes

API

Description

iter(self)

Iterate the hits object.

self[item]

Return the hit record to the query.

len(self)

Return the number of hit records.

ids

Return the ids of hit records.

distances

Return the distances of hit records.

APIs References

class pymilvus_orm.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

Constructor

Constructor

Description

Hit()

Search result about specific query.

Attributes

API

Description

id

Return the id of hit record.

distance

Return the distance of hit record.

score

Return the score of hit record.

str(self)

Return the information of hit record.

APIs References

class pymilvus_orm.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.