Skip to content

Commit cd12a49

Browse files
meili-bors[bot]kumarUjjawaldependabot[bot]
authored
724: Add method to get documents by ID r=curquiza a=kumarUjjawal # Pull Request ## Related issue Fixes #662 ## What does this PR do? - Added a method to get the documents by ID - also added code samples ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added capability to retrieve documents by their IDs for more targeted queries. * **Documentation** * Added code sample demonstrating ID-based document retrieval. <!-- end of auto-generated comment: release notes by coderabbit.ai --> 725: Update diesel-async requirement from 0.6.1 to 0.7.3 r=curquiza a=dependabot[bot] Updates the requirements on [diesel-async](https://github.com/weiznich/diesel_async) to permit the latest version. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/weiznich/diesel_async/releases">diesel-async's releases</a>.</em></p> <blockquote> <h2>Diesel-Async 0.7.3</h2> <ul> <li>Another attempt to fix the docs.rs build by <a href="https://github.com/paolobarbolini"><code>`@​paolobarbolini</code></a></li>` </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/weiznich/diesel_async/compare/v0.7.2...v0.7.3">https://github.com/weiznich/diesel_async/compare/v0.7.2...v0.7.3</a></p> </blockquote> </details> <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/weiznich/diesel_async/blob/main/CHANGELOG.md">diesel-async's changelog</a>.</em></p> <blockquote> <h2>[0.7.3] - 2025-10-05</h2> <ul> <li>Another docs.rs build fix</li> </ul> <h2>[0.7.2] - 2025-10-02</h2> <ul> <li>Fix versions in the Readme</li> </ul> <h2>[0.7.1] - 2025-10-02</h2> <ul> <li>Fix the docs.rs build</li> </ul> <h2>[0.7.0] - 2025-10-02</h2> <ul> <li>Support for diesel 2.3</li> <li>Added support for running migrations via <code>AsyncMigrationHarness</code></li> <li>Improved ergonomics of using query pipelining with <code>AsyncPgConnection</code></li> <li>Added the ability to cancel queries using <code>AsyncMysqlConnection::cancel_token</code></li> </ul> <h2>[0.6.1] - 2025-07-03</h2> <ul> <li>Fix features for some dependencies</li> </ul> <h2>[0.6.0] - 2025-07-02</h2> <ul> <li>Allow to control the statement cache size</li> <li>Minimize dependencies features</li> <li>Bump minimal supported mysql_async version to 0.36.0</li> <li>Fixing a bug in how we tracked open transaction that could lead to dangling transactions is specific cases</li> </ul> <h2>[0.5.2] - 2024-11-26</h2> <ul> <li>Fixed an issue around transaction cancellation that could lead to connection pools containing connections with dangling transactions</li> </ul> <h2>[0.5.1] - 2024-11-01</h2> <ul> <li>Add crate feature <code>pool</code> for extending connection pool implements through external crate</li> <li>Implement <code>Deref</code> and <code>DerefMut</code> for <code>AsyncConnectionWrapper</code> to allow using it in an async context as well</li> </ul> <h2>[0.5.0] - 2024-07-19</h2> <ul> <li>Added type <code>diesel_async::pooled_connection::mobc::PooledConnection</code></li> <li>MySQL/MariaDB now use <code>CLIENT_FOUND_ROWS</code> capability to allow consistent behaviour with PostgreSQL regarding return value of UPDATe commands.</li> <li>The minimal supported rust version is now 1.78.0</li> <li>Add a <code>SyncConnectionWrapper</code> type that turns a sync connection into an async one. This enables SQLite support for diesel-async</li> <li>Add support for <code>diesel::connection::Instrumentation</code> to support logging and other instrumentation for any of the provided connection impls.</li> <li>Bump minimal supported mysql_async version to 0.34</li> </ul> <h2>[0.4.1] - 2023-09-01</h2> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/weiznich/diesel_async/commit/e5e71da49416159f593f4896375e5e5c3a3b103c"><code>e5e71da</code></a> Prepare a 0.7.3 release to finally fix the docs.rs build</li> <li><a href="https://github.com/weiznich/diesel_async/commit/dacc14b0148a0a7dceb3337d0aeb2577bce67d4e"><code>dacc14b</code></a> Merge pull request <a href="https://redirect.github.com/weiznich/diesel_async/issues/265">#265</a> from paolobarbolini/no-docsrs-in-rustc</li> <li><a href="https://github.com/weiznich/diesel_async/commit/4ae157321ebf3bcd69264765bd43400449f6aaa1"><code>4ae1573</code></a> Fix docs.rs build by avoiding <code>--cfg docsrs</code> in rustc flags</li> <li><a href="https://github.com/weiznich/diesel_async/commit/46cd5fed6b7ac0a7f7b1b6e1a1283fece3813fe9"><code>46cd5fe</code></a> Fix versions in the readme</li> <li><a href="https://github.com/weiznich/diesel_async/commit/d5ac63e13307077babf976e02ef6bbab8353f079"><code>d5ac63e</code></a> Fix docs.rs build</li> <li><a href="https://github.com/weiznich/diesel_async/commit/df4c823d38d0c4e1e8d78bff5977986c8107068d"><code>df4c823</code></a> Explicitly specify what should be published and what not</li> <li><a href="https://github.com/weiznich/diesel_async/commit/4c449530625df0580ef9d19a055109a2385ae90a"><code>4c44953</code></a> Merge pull request <a href="https://redirect.github.com/weiznich/diesel_async/issues/264">#264</a> from weiznich/prepare/0.7.0</li> <li><a href="https://github.com/weiznich/diesel_async/commit/d0c4ea025d85616f95d368b951f92ff784ed721a"><code>d0c4ea0</code></a> Prepare a 0.7.0 release</li> <li><a href="https://github.com/weiznich/diesel_async/commit/356919091e47968ca2dcc534b533cf4cb62de958"><code>3569190</code></a> Merge pull request <a href="https://redirect.github.com/weiznich/diesel_async/issues/262">#262</a> from stormshield-kg/fix-hrtb-errors</li> <li><a href="https://github.com/weiznich/diesel_async/commit/661de8c4442a123ccde74001b44fc6a154dbc4b2"><code>661de8c</code></a> Replace hand written future impls</li> <li>Additional commits viewable in <a href="https://github.com/weiznich/diesel_async/compare/v0.6.1...v0.7.3">compare view</a></li> </ul> </details> <br /> You can trigger a rebase of this PR by commenting ``@dependabot` rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - ``@dependabot` rebase` will rebase this PR - ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it - ``@dependabot` merge` will merge this PR after your CI passes on it - ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it - ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging - ``@dependabot` reopen` will reopen this PR if it is closed - ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - ``@dependabot` show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> 726: Add exhaustive facet search r=curquiza a=kumarUjjawal # Pull Request ## Related issue Fixes #664 ## What does this PR do? - ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Results now include a flag indicating whether facet counts are exact or estimated, so callers can know when displayed facet totals are definitive. * Added an optional query setting and a builder-style method to request exhaustive (exact) facet counts when performing searches, giving users control over accuracy vs. performance. <!-- end of auto-generated comment: release notes by coderabbit.ai --> 728: Add support for compacting database indexes r=curquiza a=kumarUjjawal # Pull Request ## Related issue Fixes #727 ## What does this PR do? - I noticed a typo in the `.code-samples.meilisearch.yaml` so fixed that as well. - ## PR checklist Please check if your PR fulfills the following requirements: - [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)? - [x] Have you read the contributing guidelines? - [x] Have you made sure that the title is accurate and descriptive of the changes? Thank you so much for contributing to Meilisearch! <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added ability to perform index compaction and monitor its completion as an async task. * **Documentation** * Added compact index code sample. * Fixed typos in field properties guide examples (corrected "overview" in searchable and displayed attributes). <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Kumar Ujjawal <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
5 parents 5757ec4 + aa5c74f + dc7ee1e + 53a95b7 + ffb025f commit cd12a49

File tree

6 files changed

+210
-4
lines changed

6 files changed

+210
-4
lines changed

.code-samples.meilisearch.yaml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ get_documents_post_1: |-
142142
.execute::<Movies>()
143143
.await
144144
.unwrap();
145+
get_documents_by_ids_1: |-
146+
let index = client.index("books");
147+
let documents: DocumentsResults = DocumentsQuery::new(&index)
148+
.with_ids(["1", "2"]) // retrieve documents by IDs
149+
.execute::<Movies>()
150+
.await
151+
.unwrap();
145152
add_or_replace_documents_1: |-
146153
let task: TaskInfo = client
147154
.index("movies")
@@ -712,10 +719,16 @@ distinct_attribute_guide_1: |-
712719
.set_distinct_attribute("product_id")
713720
.await
714721
.unwrap();
722+
compact_index_1: |-
723+
let task: TaskInfo = client
724+
.index("INDEX_UID")
725+
.compact()
726+
.await
727+
.unwrap();
715728
field_properties_guide_searchable_1: |-
716729
let searchable_attributes = [
717730
"title",
718-
"overvieww",
731+
"overview",
719732
"genres"
720733
];
721734
@@ -727,7 +740,7 @@ field_properties_guide_searchable_1: |-
727740
field_properties_guide_displayed_1: |-
728741
let displayed_attributes = [
729742
"title",
730-
"overvieww",
743+
"overview",
731744
"genres",
732745
"release_date"
733746
];

examples/web_app_graphql/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ actix-web = "4.4.0"
1212
async-graphql = "6.0.11"
1313
async-graphql-actix-web = "6.0.11"
1414
diesel = { version = "2.1.4", features = ["postgres"] }
15-
diesel-async = { version = "0.6.1", features = ["postgres", "deadpool"] }
15+
diesel-async = { version = "0.7.3", features = ["postgres", "deadpool"] }
1616
diesel_migrations = "2.1.0"
1717
dotenvy = "0.15.7"
1818
env_logger = "0.11.3"

src/documents.rs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,15 @@ pub struct DocumentsQuery<'a, Http: HttpClient> {
202202
/// Read the [dedicated guide](https://www.meilisearch.com/docs/learn/filtering_and_sorting) to learn the syntax.
203203
#[serde(skip_serializing_if = "Option::is_none")]
204204
pub filter: Option<&'a str>,
205+
206+
/// Retrieve documents by their IDs.
207+
///
208+
/// When `ids` is provided, the SDK will call the `/documents/fetch` endpoint with a POST request.
209+
///
210+
/// Note: IDs are represented as strings to keep consistency with [`Index::get_document`]. If your IDs
211+
/// are numeric, pass them as strings (e.g., `"1"`, `"2"`).
212+
#[serde(skip_serializing_if = "Option::is_none")]
213+
pub ids: Option<Vec<&'a str>>,
205214
}
206215

207216
impl<'a, Http: HttpClient> DocumentsQuery<'a, Http> {
@@ -214,6 +223,7 @@ impl<'a, Http: HttpClient> DocumentsQuery<'a, Http> {
214223
fields: None,
215224
sort: None,
216225
filter: None,
226+
ids: None,
217227
}
218228
}
219229

@@ -314,6 +324,29 @@ impl<'a, Http: HttpClient> DocumentsQuery<'a, Http> {
314324
self
315325
}
316326

327+
/// Specify a list of document IDs to retrieve.
328+
///
329+
/// # Example
330+
///
331+
/// ```
332+
/// # use meilisearch_sdk::{client::*, indexes::*, documents::*};
333+
/// # use serde::{Deserialize, Serialize};
334+
/// #
335+
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
336+
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
337+
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY)).unwrap();
338+
/// let index = client.index("get_documents_by_ids_example");
339+
/// let mut query = DocumentsQuery::new(&index);
340+
/// query.with_ids(["1", "2"]);
341+
/// ```
342+
pub fn with_ids(
343+
&mut self,
344+
ids: impl IntoIterator<Item = &'a str>,
345+
) -> &mut DocumentsQuery<'a, Http> {
346+
self.ids = Some(ids.into_iter().collect());
347+
self
348+
}
349+
317350
/// Execute the get documents query.
318351
///
319352
/// # Example
@@ -468,6 +501,19 @@ mod tests {
468501
Ok(())
469502
}
470503

504+
#[meilisearch_test]
505+
async fn test_get_documents_by_ids(client: Client, index: Index) -> Result<(), Error> {
506+
setup_test_index(&client, &index).await?;
507+
508+
let documents = DocumentsQuery::new(&index)
509+
.with_ids(["1", "3"]) // retrieve by IDs
510+
.execute::<MyObject>()
511+
.await?;
512+
513+
assert_eq!(documents.results.len(), 2);
514+
Ok(())
515+
}
516+
471517
#[meilisearch_test]
472518
async fn test_delete_documents_with(client: Client, index: Index) -> Result<(), Error> {
473519
setup_test_index(&client, &index).await?;

src/indexes.rs

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ impl<Http: HttpClient> Index<Http> {
517517
&self,
518518
documents_query: &DocumentsQuery<'_, Http>,
519519
) -> Result<DocumentsResults<T>, Error> {
520-
if documents_query.filter.is_some() {
520+
if documents_query.filter.is_some() || documents_query.ids.is_some() {
521521
let url = format!("{}/indexes/{}/documents/fetch", self.client.host, self.uid);
522522
return self
523523
.client
@@ -1325,6 +1325,55 @@ impl<Http: HttpClient> Index<Http> {
13251325
Ok(self.primary_key.as_deref())
13261326
}
13271327

1328+
/// Compact this index to reduce disk usage.
1329+
///
1330+
/// Triggers a compaction task for the current index. Once completed, the
1331+
/// index data is compacted on disk.
1332+
///
1333+
/// # Example
1334+
///
1335+
/// ```
1336+
/// # use meilisearch_sdk::{client::*, indexes::*, tasks::Task};
1337+
/// # let MEILISEARCH_URL = option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700");
1338+
/// # let MEILISEARCH_API_KEY = option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey");
1339+
/// # tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on(async {
1340+
/// # let client = Client::new(MEILISEARCH_URL, Some(MEILISEARCH_API_KEY)).unwrap();
1341+
/// # let index = client
1342+
/// # .create_index("compact_example", None)
1343+
/// # .await
1344+
/// # .unwrap()
1345+
/// # .wait_for_completion(&client, None, None)
1346+
/// # .await
1347+
/// # .unwrap()
1348+
/// # .try_make_index(&client)
1349+
/// # .unwrap();
1350+
///
1351+
/// let task = index
1352+
/// .compact()
1353+
/// .await
1354+
/// .unwrap()
1355+
/// .wait_for_completion(&client, None, None)
1356+
/// .await
1357+
/// .unwrap();
1358+
///
1359+
/// assert!(matches!(task, Task::Succeeded { .. }));
1360+
/// # index.delete().await.unwrap().wait_for_completion(&client, None, None).await.unwrap();
1361+
/// # });
1362+
/// ```
1363+
pub async fn compact(&self) -> Result<TaskInfo, Error> {
1364+
self.client
1365+
.http_client
1366+
.request::<(), (), TaskInfo>(
1367+
&format!("{}/indexes/{}/compact", self.client.host, self.uid),
1368+
Method::Post {
1369+
query: (),
1370+
body: (),
1371+
},
1372+
202,
1373+
)
1374+
.await
1375+
}
1376+
13281377
/// Get a [Task] from a specific [Index] to keep track of [asynchronous operations](https://www.meilisearch.com/docs/learn/advanced/asynchronous_operations).
13291378
///
13301379
/// # Example
@@ -2441,4 +2490,16 @@ mod tests {
24412490
}
24422491
Ok(())
24432492
}
2493+
2494+
#[meilisearch_test]
2495+
async fn test_compact_index_succeeds(client: Client, index: Index) -> Result<(), Error> {
2496+
let task = index
2497+
.compact()
2498+
.await?
2499+
.wait_for_completion(&client, None, None)
2500+
.await?;
2501+
2502+
assert!(task.is_success());
2503+
Ok(())
2504+
}
24442505
}

src/search.rs

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,9 @@ pub struct SearchResults<T> {
115115
pub facet_distribution: Option<HashMap<String, HashMap<String, usize>>>,
116116
/// facet stats of the numerical facets requested in the `facet` search parameter.
117117
pub facet_stats: Option<HashMap<String, FacetStats>>,
118+
/// Indicates whether facet counts are exhaustive (exact) rather than estimated.
119+
/// Present when the `exhaustiveFacetCount` search parameter is used.
120+
pub exhaustive_facet_count: Option<bool>,
118121
/// Processing time of the query.
119122
pub processing_time_ms: usize,
120123
/// Query originating the response.
@@ -408,6 +411,13 @@ pub struct SearchQuery<'a, Http: HttpClient> {
408411
#[serde(skip_serializing_if = "Option::is_none")]
409412
pub retrieve_vectors: Option<bool>,
410413

414+
/// Request exhaustive facet counts up to the limit defined by `maxTotalHits`.
415+
///
416+
/// When set to `true`, Meilisearch computes exact facet counts instead of approximate ones.
417+
/// Default is `false`.
418+
#[serde(skip_serializing_if = "Option::is_none")]
419+
pub exhaustive_facet_count: Option<bool>,
420+
411421
#[serde(skip_serializing_if = "Option::is_none")]
412422
pub(crate) federation_options: Option<QueryFederationOptions>,
413423
}
@@ -453,6 +463,7 @@ impl<'a, Http: HttpClient> SearchQuery<'a, Http> {
453463
hybrid: None,
454464
vector: None,
455465
retrieve_vectors: None,
466+
exhaustive_facet_count: None,
456467
distinct: None,
457468
ranking_score_threshold: None,
458469
locales: None,
@@ -721,6 +732,15 @@ impl<'a, Http: HttpClient> SearchQuery<'a, Http> {
721732
self.clone()
722733
}
723734

735+
/// Request exhaustive facet count in the response.
736+
pub fn with_exhaustive_facet_count<'b>(
737+
&'b mut self,
738+
exhaustive: bool,
739+
) -> &'b mut SearchQuery<'a, Http> {
740+
self.exhaustive_facet_count = Some(exhaustive);
741+
self
742+
}
743+
724744
/// Execute the query and fetch the results.
725745
pub async fn execute<T: 'static + DeserializeOwned + Send + Sync>(
726746
&'a self,
@@ -1090,6 +1110,7 @@ pub struct FacetSearchResponse {
10901110

10911111
#[cfg(test)]
10921112
pub(crate) mod tests {
1113+
use crate::errors::{ErrorCode, MeilisearchError};
10931114
use crate::{
10941115
client::*,
10951116
key::{Action, KeyBuilder},
@@ -1968,6 +1989,64 @@ pub(crate) mod tests {
19681989
Ok(())
19691990
}
19701991

1992+
#[meilisearch_test]
1993+
async fn test_search_with_exhaustive_facet_count(
1994+
client: Client,
1995+
index: Index,
1996+
) -> Result<(), Error> {
1997+
setup_test_index(&client, &index).await?;
1998+
1999+
// Request exhaustive facet counts for a specific facet and ensure the server
2000+
// returns the exhaustive flag in the response.
2001+
let mut query = SearchQuery::new(&index);
2002+
query
2003+
.with_facets(Selectors::Some(&["kind"]))
2004+
.with_exhaustive_facet_count(true);
2005+
2006+
let res = index.execute_query::<Document>(&query).await;
2007+
match res {
2008+
Ok(results) => {
2009+
assert!(results.exhaustive_facet_count.is_some());
2010+
Ok(())
2011+
}
2012+
Err(error)
2013+
if matches!(
2014+
error,
2015+
Error::Meilisearch(MeilisearchError {
2016+
error_code: ErrorCode::BadRequest,
2017+
..
2018+
})
2019+
) =>
2020+
{
2021+
// Server doesn't support this field on /search yet; treat as a skip.
2022+
Ok(())
2023+
}
2024+
Err(e) => Err(e),
2025+
}
2026+
}
2027+
2028+
#[test]
2029+
fn test_search_query_serialization_exhaustive_facet_count() {
2030+
// Build a query and ensure it serializes using the expected camelCase field name
2031+
let client = Client::new(
2032+
option_env!("MEILISEARCH_URL").unwrap_or("http://localhost:7700"),
2033+
Some(option_env!("MEILISEARCH_API_KEY").unwrap_or("masterKey")),
2034+
)
2035+
.unwrap();
2036+
let index = client.index("dummy");
2037+
2038+
let mut query = SearchQuery::new(&index);
2039+
query
2040+
.with_facets(Selectors::Some(&["kind"]))
2041+
.with_exhaustive_facet_count(true);
2042+
2043+
let v = serde_json::to_value(&query).unwrap();
2044+
assert_eq!(
2045+
v.get("exhaustiveFacetCount").and_then(|b| b.as_bool()),
2046+
Some(true)
2047+
);
2048+
}
2049+
19712050
#[meilisearch_test]
19722051
async fn test_facet_search_with_facet_query(client: Client, index: Index) -> Result<(), Error> {
19732052
setup_test_index(&client, &index).await?;

src/tasks.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ pub enum TaskType {
4545
SnapshotCreation {
4646
details: Option<SnapshotCreation>,
4747
},
48+
IndexCompaction {
49+
details: Option<IndexCompaction>,
50+
},
4851
}
4952

5053
#[derive(Debug, Clone, Deserialize)]
@@ -93,6 +96,10 @@ pub struct IndexDeletion {
9396
#[serde(rename_all = "camelCase")]
9497
pub struct SnapshotCreation {}
9598

99+
#[derive(Debug, Clone, Deserialize)]
100+
#[serde(rename_all = "camelCase")]
101+
pub struct IndexCompaction {}
102+
96103
#[derive(Debug, Clone, Deserialize)]
97104
#[serde(rename_all = "camelCase")]
98105
pub struct DumpCreation {

0 commit comments

Comments
 (0)