Skip to content

Commit cd3b6e2

Browse files
authored
Add missing code samples for mintlify (#3430)
1 parent 0f843d0 commit cd3b6e2

1 file changed

Lines changed: 33 additions & 3 deletions

File tree

.code-samples.meilisearch.yaml

Lines changed: 33 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Every example written here will be automatically fetched by
33
# the documentation on build
44
---
5-
## BEGIN /references/api
5+
## BEGIN /references/api
66
# get_indexes_indexUid
77
get_one_index_1: |-
88
curl \
@@ -68,7 +68,7 @@ add_or_update_documents_1: |-
6868
delete_all_documents_1: |-
6969
curl \
7070
-X DELETE 'MEILISEARCH_URL/indexes/movies/documents'
71-
# delete_indexes_indexUid_documentId
71+
# delete_indexes_indexUid_documents_documentId
7272
delete_one_document_1: |-
7373
curl \
7474
-X DELETE 'MEILISEARCH_URL/indexes/movies/documents/25684'
@@ -581,6 +581,24 @@ update_vector_store_settings_1: |-
581581
reset_vector_store_settings_1: |-
582582
curl \
583583
-X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'
584+
# get_indexes_indexUid_settings_chat
585+
get_chat_settings_1: |-
586+
curl \
587+
-X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat'
588+
# patch_indexes_indexUid_settings_chat
589+
update_chat_settings_1: |-
590+
curl \
591+
-X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat' \
592+
-H 'Content-Type: application/json' \
593+
--data-binary '{
594+
"description": "An index of movies.",
595+
"documentTemplate": "A movie titled '{{doc.title}}' released in {{ doc.release_date }}",
596+
"documentTemplateMaxBytes": 400
597+
}'
598+
# delete_indexes_indexUid_settings_chat
599+
reset_chat_settings_1: |-
600+
curl \
601+
-X DELETE 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat'
584602
### END settings + subroutes
585603

586604
# post_dumps
@@ -655,6 +673,18 @@ delete_documents_by_filter_1: |-
655673
--data-binary '{
656674
"filter": "genres = action OR genres = adventure"
657675
}'
676+
# post_indexes_indexUid_documents_edit
677+
edit_documents_by_function_1: |-
678+
curl \
679+
-X POST 'MEILISEARCH_URL/indexes/movies/documents/edit' \
680+
-H 'Content-Type: application/json' \
681+
--data-binary '{
682+
"function": "doc.new_field = `a]new[value`",
683+
"filter": "id > 3000",
684+
"context": {
685+
"max_title_length": 10
686+
}
687+
}'
658688
# get_experimental_features
659689
get_experimental_features_1: |-
660690
curl \
@@ -1740,7 +1770,7 @@ multi_search_remote_federated_1: |-
17401770
}
17411771
}
17421772
]
1743-
1773+
17441774
search_parameter_reference_media_1: |-
17451775
curl \
17461776
-X POST 'MEILISEARCH_URL/indexes/INDEX_NAME/search' \

0 commit comments

Comments
 (0)