@@ -94,6 +94,11 @@ update_an_index_1: |-
9494 .execute()
9595 .await
9696 .unwrap();
97+ rename_an_index_1 : |-
98+ curl \
99+ -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \
100+ -H 'Content-Type: application/json' \
101+ --data-binary '{ "uid": "INDEX_B" }'
97102delete_an_index_1 : |-
98103 client.index("movies")
99104 .delete()
@@ -137,6 +142,13 @@ get_documents_post_1: |-
137142 .execute::<Movies>()
138143 .await
139144 .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();
140152add_or_replace_documents_1 : |-
141153 let task: TaskInfo = client
142154 .index("movies")
@@ -444,6 +456,23 @@ reset_typo_tolerance_1: |-
444456 .reset_typo_tolerance()
445457 .await
446458 .unwrap();
459+ get_all_batches_1 : |-
460+ let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);
461+ query.with_limit(20);
462+ let batches: meilisearch_sdk::batches::BatchesResults =
463+ client.get_batches_with(&query).await.unwrap();
464+ get_batch_1 : |-
465+ let uid: u32 = 42;
466+ let batch: meilisearch_sdk::batches::Batch = client
467+ .get_batch(uid)
468+ .await
469+ .unwrap();
470+ get_all_batches_paginating_1 : |-
471+ let mut query = meilisearch_sdk::batches::BatchesQuery::new(&client);
472+ query.with_limit(2);
473+ query.with_from(40);
474+ let batches: meilisearch_sdk::batches::BatchesResults =
475+ client.get_batches_with(&query).await.unwrap();
447476get_stop_words_1 : |-
448477 let stop_words: Vec<String> = client
449478 .index("movies")
@@ -690,10 +719,16 @@ distinct_attribute_guide_1: |-
690719 .set_distinct_attribute("product_id")
691720 .await
692721 .unwrap();
722+ compact_index_1 : |-
723+ let task: TaskInfo = client
724+ .index("INDEX_UID")
725+ .compact()
726+ .await
727+ .unwrap();
693728field_properties_guide_searchable_1 : |-
694729 let searchable_attributes = [
695730 "title",
696- "overvieww ",
731+ "overview ",
697732 "genres"
698733 ];
699734
@@ -705,7 +740,7 @@ field_properties_guide_searchable_1: |-
705740field_properties_guide_displayed_1 : |-
706741 let displayed_attributes = [
707742 "title",
708- "overvieww ",
743+ "overview ",
709744 "genres",
710745 "release_date"
711746 ];
@@ -1060,7 +1095,7 @@ primary_field_guide_add_document_primary_key: |-
10601095getting_started_add_documents : |-
10611096 // In your .toml file:
10621097 [dependencies]
1063- meilisearch-sdk = "0.29.1 "
1098+ meilisearch-sdk = "0.31.0 "
10641099 # futures: because we want to block on futures
10651100 futures = "0.3"
10661101 # serde: required if you are going to use documents
@@ -1936,6 +1971,20 @@ search_parameter_reference_retrieve_vectors_1: |-
19361971 .execute()
19371972 .await
19381973 .unwrap();
1974+ search_parameter_reference_media_1 : |-
1975+ let results = index
1976+ .search()
1977+ .with_hybrid("EMBEDDER_NAME", 0.5)
1978+ .with_media(json!({
1979+ "FIELD_A": "VALUE_A",
1980+ "FIELD_B": {
1981+ "FIELD_C": "VALUE_B",
1982+ "FIELD_D": "VALUE_C"
1983+ }
1984+ }))
1985+ .execute()
1986+ .await
1987+ .unwrap();
19391988update_embedders_1 : |-
19401989 let embedders = HashMap::from([(
19411990 String::from("default"),
@@ -1951,3 +2000,22 @@ update_embedders_1: |-
19512000 .set_embedders(&embedders)
19522001 .await
19532002 .unwrap();
2003+ webhooks_get_1 : |-
2004+ let webhooks = client.get_webhooks().await.unwrap();
2005+ webhooks_get_single_1 : |-
2006+ let webhook = client.get_webhook("WEBHOOK_UUID").await.unwrap();
2007+ webhooks_post_1 : |-
2008+ let mut payload = meilisearch_sdk::webhooks::WebhookCreate::new("WEBHOOK_TARGET_URL");
2009+ payload
2010+ .insert_header("authorization", "SECURITY_KEY")
2011+ .insert_header("referer", "https://example.com");
2012+ let webhook = client.create_webhook(&payload).await.unwrap();
2013+ webhooks_patch_1 : |-
2014+ let mut update = meilisearch_sdk::webhooks::WebhookUpdate::new();
2015+ update.remove_header("referer");
2016+ let webhook = client
2017+ .update_webhook("WEBHOOK_UUID", &update)
2018+ .await
2019+ .unwrap();
2020+ webhooks_delete_1 : |-
2021+ client.delete_webhook("WEBHOOK_UUID").await.unwrap();
0 commit comments