-
Notifications
You must be signed in to change notification settings - Fork 100
Add documents and embbedings database metrics to stats response #652
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Frank Elsinga <[email protected]>
WalkthroughThe Changes
Sequence Diagram(s)sequenceDiagram
participant API
participant IndexStats
API->>IndexStats: Request statistics
IndexStats-->>API: Respond with number_of_documents, is_indexing, field_distribution, raw_document_db_size, avg_document_size, number_of_embedded_documents, number_of_embeddings
Assessment against linked issues
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (4)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -1795,9 +1795,20 @@ impl<'a, Http: HttpClient> AsRef<IndexUpdater<'a, Http>> for IndexUpdater<'a, Ht | |||
#[derive(Debug, Clone, Deserialize)] |
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.
thinking about it, this should also be non_exhaustive
.
There are bound to be more stats in the future
#[derive(Debug, Clone, Deserialize)] | |
#[non_exhaustive] | |
#[derive(Debug, Clone, Deserialize)] |
@@ -1795,9 +1795,20 @@ impl<'a, Http: HttpClient> AsRef<IndexUpdater<'a, Http>> for IndexUpdater<'a, Ht | |||
#[derive(Debug, Clone, Deserialize)] | |||
#[serde(rename_all = "camelCase")] | |||
pub struct IndexStats { |
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.
Lets also add more doc-comments here
pub struct IndexStats { | |
/// Gives extended information and metrics about indexes and the Meilisearch database | |
pub struct IndexStats { |
Pull Request
Related issue
Fixes #650
Fixes #649
What does this PR do?
This pull request includes an update to the
IndexStats
struct in thesrc/indexes.rs
file to add several new fields for more detailed tracking of index statistics.Changes in
IndexStats
struct:raw_document_db_size
field to track the size of the raw document database.avg_document_size
field to track the average size of documents.number_of_embedded_documents
field to track the number of embedded documents.number_of_embeddings
field to track the number of embeddings.PR checklist
Please check if your PR fulfills the following requirements:
Thank you so much for contributing to Meilisearch!
Summary by CodeRabbit
New Features
Documentation