-
Notifications
You must be signed in to change notification settings - Fork 184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add size to index-stats API response #492
base: mainline
Are you sure you want to change the base?
Conversation
Hi @hmacr ! Thanks for the PR!
|
@pandu-k Apologies, I understand it's been a long time since I created the pull request; I'm trying to be more active on open source these days. About the review comments, I've addressed them and ran the unit-tests as well (attaching the screenshots; there was one failure due to an unavailable remote repo). Please let me know your feedback. |
assert tensor_search.get_stats(config=self.config, index_name=self.index_name_1)["numberOfDocuments"] == 3 | ||
index_stats = tensor_search.get_stats(config=self.config, index_name=self.index_name_1) | ||
assert index_stats["numberOfDocuments"] == 3 | ||
assert len(index_stats["size"]) != 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw that the computed size of the documents uploaded in this test was changing on each run; so figured len
check would be a good assertion here, and added unit-tests for the bytes to human readable format function here
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
feature
What is the current behavior? (You can also link to an open issue here)
Add Index Size (GB) in stats[ENHANCEMENT] #374
What is the new behavior (if this is a feature change)?
Index size will be returned as a field named
size
in the index-stats API responseDoes this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No
Have unit tests been run against this PR? (Has there also been any additional testing?)
Yes
Related Python client changes (link commit/PR here)
There is no
index/stats
client method exposed in py-marqo. Do you want it to be added as part of this change?Related documentation changes (link commit/PR here)
Other information:
Please check if the PR fulfills these requirements