Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fix: k more than num docs
Signed-off-by: jupyterjazz <[email protected]>
  • Loading branch information
jupyterjazz committed Jul 26, 2023
commit 3ca5780b9f5c89769e8ead133475151d205105d3
2 changes: 1 addition & 1 deletion docarray/index/backends/hnswlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def _search_and_filter(
return _FindResultBatched(documents=[], scores=[]) # type: ignore

# Set limit as the minimum of the provided limit and the total number of documents
limit = limit
limit = min(limit, self.num_docs())

# Ensure the search field is in the HNSW indices
if search_field not in self._hnsw_indices:
Expand Down