Skip to content

Commit

Permalink
feat: add total number of results
Browse files Browse the repository at this point in the history
  • Loading branch information
raphael0202 committed Sep 22, 2023
1 parent 0b120a1 commit b0c8c0d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/postprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ def process(self, response: Response, projection: set[str] | None) -> JSONType:
output = {
"took": response.took,
"timed_out": response.timed_out,
"count": response.hits.total["value"],
"is_count_exact": response.hits.total["relation"] == "eq",
}
hits = []
for hit in response.hits:
Expand Down

0 comments on commit b0c8c0d

Please sign in to comment.