aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fatcat-cli/src/search.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/fatcat-cli/src/search.rs b/fatcat-cli/src/search.rs
index 88361c5..e4f7dce 100644
--- a/fatcat-cli/src/search.rs
+++ b/fatcat-cli/src/search.rs
@@ -140,6 +140,7 @@ pub fn crude_search(
},
"size": size,
"sort": [ sort_mode ],
+ "track_total_hits": true,
})
.to_string();
@@ -169,7 +170,7 @@ pub fn crude_search(
Ok(SearchResults {
entity_type,
limit,
- count: body["hits"]["total"].as_u64().unwrap(),
+ count: body["hits"]["total"]["value"].as_u64().unwrap(),
took_ms: body["took"].as_u64().unwrap(),
offset: 0,
batch: body["hits"]["hits"].as_array().unwrap().to_vec(),