Skip to content

Commit

Permalink
feat: add size to index-stats API response
Browse files Browse the repository at this point in the history
  • Loading branch information
hmacr committed May 26, 2023
1 parent 27152a9 commit 4153c74
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/marqo/tensor_search/tensor_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,11 @@ def _autofill_index_settings(index_settings: dict):

def get_stats(config: Config, index_name: str):
doc_count = HttpRequests(config).post(path=F"{index_name}/_count")["count"]
index_info = HttpRequests(config).get(path=F"_cat/indices/{index_name}?format=json")
size = index_info[0]["store.size"]
return {
"numberOfDocuments": doc_count
"numberOfDocuments": doc_count,
"size": size
}


Expand Down

0 comments on commit 4153c74

Please sign in to comment.