Skip to content

Commit

Permalink
Update document_stores/elasticsearch/src/elasticsearch_haystack/docum…
Browse files Browse the repository at this point in the history
…ent_store.py

Co-authored-by: Silvano Cerza <[email protected]>
  • Loading branch information
anakin87 and silvanocerza authored Nov 20, 2023
1 parent ac33be6 commit b3e6cb7
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _search_documents(self, **kwargs) -> List[Document]:
documents.extend(self._deserialize_document(hit) for hit in res["hits"]["hits"])
from_ += len(documents)

if top_k and from_ >= top_k:
if top_k is not None and from_ >= top_k:
break
if from_ >= res["hits"]["total"]["value"]:
break
Expand Down

0 comments on commit b3e6cb7

Please sign in to comment.