Open
Description
Description
If you want to get the statistics of an index with index.get_stats()
like here, you get the corresponding data class (IndexStats
), but you can't get any values from it with __getattr__
, even though it is implemented in the class. Instead, you get the name of the attribute you wanted to access.
Expected behavior
A call to __getattr__
of the IndexStats
class returns the value of the attribute (if it exists).
Current behavior
A call to __getattr__
of the IndexStats
class returns the name of the attribute, not the value.
Example
import meilisearch as ms
ms_client = ms.Client(<host>, <master key>)
foo_index = ms_client.index("foo")
stats = foo_index.get_stats()
print(stats.numberOfDocuments) # prints "numberOfDocuments" instead of the actual number of Documents
Environment (please complete the following information):
- meilisearch-python version: v0.34.1
Metadata
Metadata
Assignees
Labels
No labels