mirror of
https://github.com/typesense/typesense.git
synced 2025-05-21 06:02:26 +08:00
Return total documents in collection in every search response.
This commit is contained in:
parent
1a8d5a0912
commit
e07dcded7b
@ -921,6 +921,7 @@ Option<nlohmann::json> Collection::search(const std::string & query, const std::
|
||||
nlohmann::json result = nlohmann::json::object();
|
||||
|
||||
result["found"] = total_found;
|
||||
result["out_of"] = num_documents;
|
||||
|
||||
std::string hits_key = group_limit ? "grouped_hits" : "hits";
|
||||
result[hits_key] = nlohmann::json::array();
|
||||
|
Loading…
x
Reference in New Issue
Block a user