Skip to content

Commit

Permalink
fix: pass limit as integer (#1657)
Browse files Browse the repository at this point in the history
Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
  • Loading branch information
JoanFM committed Jun 16, 2023
1 parent 7e211a9 commit dc96e38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docarray/index/backends/hnswlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def _find_batched(
limit = min(limit, self.num_docs())

index = self._hnsw_indices[search_field]
labels, distances = index.knn_query(queries, k=limit)
labels, distances = index.knn_query(queries, k=int(limit))
result_das = [
self._get_docs_sqlite_hashed_id(
ids_per_query.tolist(),
Expand Down

0 comments on commit dc96e38

Please sign in to comment.