Skip to content

Commit

Permalink
Fix non reconstruct case, ensure all integ tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
austintlee committed Feb 11, 2025
1 parent f9be43f commit c4372fd
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def _to_parent_doc(self, doc: dict[str, Any]) -> List[dict[str, Any]]:
return ret

@timetrace("OpenSearchReader")
def _to_doc(self, slice_query: dict[str, Any]) -> List[dict[str, Any]]:
def _to_doc(self, doc: dict[str, Any]) -> List[dict[str, Any]]:
"""
Get all documents from a given slice.
"""
Expand All @@ -370,6 +370,7 @@ def _to_doc(self, slice_query: dict[str, Any]) -> List[dict[str, Any]]:
raise ValueError("Target is not present\n" f"Parameters: {self._query_params}\n")

os_client = client._client
slice_query = json.loads(doc["doc"])
slice_count = get_doc_count_for_slice(os_client, slice_query)
assert slice_count <= 10000, f"Slice count ({slice_count}) should return <= 10,000 documents"

Expand Down

0 comments on commit c4372fd

Please sign in to comment.