meilisearch / meilisearch/meilisearch-ruby

[Meilisearch v1.44.0] Add human-formatted sizes and detailed DB sizes in stats

Open
#697 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement good first issue
Dominant language
Ruby
Stars
224
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Context

[Meilisearch 1.44.0]https://github.com/meilisearch/meilisearch/releases/tag/v1.44.0) introduces human-formatted sizes and detailed DB sizes in stats.

Objective

Update the corresponding SDK methods:

Both related API endpoints now accept new query parameters:

  • showInternalDatabaseSizes: boolean, optional, defaults to false. When present, the index stat objects in responses of the stat routes now contain an additional internalDatabaseSizes key, whose value is a dictionary of the internal database names and their current size in the index, like in the stats object of a batch.
  • sizeFormat: human or raw: optional, defaults to raw. When present and set to human, then all database sizes in responses of the stat routes will be returned as a string containing an appropriate unit (MiB, GiB, etc). When missing or set to raw, then the current behavior of expressing the size in bytes as a number is retained.

The keys in internalDatabaseSizes are subject to change and should not be exposed as a strongly typed object.

Tasks

  • Add/update methods to handle interacting with the stats API endpoints
  • Add/update test cases for the new/updated methods
  • Update .code-samples.meilisearch.yaml to add examples under the following keys: get_index_stats_1 and get_indexes_stats_1. It should match the examples in the documentation.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the existing Ruby methods and tests for the index stats and all-indexes stats endpoints. Add coverage for sizeFormat and showInternalDatabaseSizes, keeping internalDatabaseSizes flexible, then update .code-samples.meilisearch.yaml under get_index_stats_1 and get_indexes_stats_1 to match the documentation examples. Done means the methods, tests, and both code samples support the Meilisearch v1.44.0 responses.

Written by the indexing model from the issue text.

Assessment

Tech stack
ruby
Domain
api
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.