From d524775e3b028955d6a633cf1224af519fae6b2f Mon Sep 17 00:00:00 2001 From: gui machiavelli Date: Thu, 11 Sep 2025 12:59:13 +0200 Subject: [PATCH 1/4] add new experimental feature --- .code-samples.meilisearch.yaml | 11 ++ .../experimental_features_overview.mdx | 2 +- reference/api/experimental_features.mdx | 11 +- reference/api/settings.mdx | 116 +++++++++++++++++- 4 files changed, 134 insertions(+), 6 deletions(-) diff --git a/.code-samples.meilisearch.yaml b/.code-samples.meilisearch.yaml index 1fce7302b9..22143d22a9 100644 --- a/.code-samples.meilisearch.yaml +++ b/.code-samples.meilisearch.yaml @@ -1596,3 +1596,14 @@ search_parameter_reference_media_1: |- } } }' +get_vector_store_settings_1: |- + curl \ + -X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' +update_vector_store_settings_1: |- + curl \ + -X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' \ + -H 'Content-Type: application/json' \ + --data-binary '"experimental"' +reset_vector_store_settings_1: |- + curl \ + -X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' diff --git a/learn/resources/experimental_features_overview.mdx b/learn/resources/experimental_features_overview.mdx index 1ec5ebc81b..536c71aa0e 100644 --- a/learn/resources/experimental_features_overview.mdx +++ b/learn/resources/experimental_features_overview.mdx @@ -61,4 +61,4 @@ Activating or deactivating experimental features this way does not require you t | [Maximum batch payload size](/learn/self_hosted/configure_meilisearch_at_launch#maximum-batch-payload-size) | Limit batch payload size | CLI flag or environment variable | | [Multimodal search](/reference/api/settings) | Enable multimodal search | API route | | [Disable new indexer](/learn/self_hosted/configure_meilisearch_at_launch) | Use previous settings indexer | CLI flag or environment variable | - +| [Experimental vector store](/reference/api/settings) | Enables index setting to use experimental vector store | API route | diff --git a/reference/api/experimental_features.mdx b/reference/api/experimental_features.mdx index b03cd95b6f..ec666ba345 100644 --- a/reference/api/experimental_features.mdx +++ b/reference/api/experimental_features.mdx @@ -27,7 +27,8 @@ The experimental API route is not compatible with all experimental features. Con "editDocumentsByFunction": false, "network": false, "chatCompletions": false, - "multimodal": false + "multimodal": false, + "vectorStoreSetting": false } ``` @@ -40,6 +41,7 @@ The experimental API route is not compatible with all experimental features. Con | **`network`** | Boolean | `true` if feature is active, `false` otherwise | | **`chatCompletions`** | Boolean | `true` if feature is active, `false` otherwise | | **`multimodal`** | Boolean | `true` if feature is active, `false` otherwise | +| **`vectorStoreSetting`** | Boolean | `true` if feature is active, `false` otherwise | ## Get all experimental features @@ -61,7 +63,8 @@ Get a list of all experimental features that can be activated via the `/experime "editDocumentsByFunction": false, "network": false, "chatCompletions": false, - "multimodal": false + "multimodal": false, + "vectorStoreSetting": false } ``` @@ -90,7 +93,7 @@ Setting a field to `null` leaves its value unchanged. "containsFilter": false, "editDocumentsByFunction": false, "network": false, - "chatCompletions": false, - "multimodal": false + "multimodal": false, + "vectorStoreSetting": false } ``` diff --git a/reference/api/settings.mdx b/reference/api/settings.mdx index 3737fd50d4..f60f1c5d08 100644 --- a/reference/api/settings.mdx +++ b/reference/api/settings.mdx @@ -69,6 +69,9 @@ import CodeSamplesUpdateSortableAttributes1 from '/snippets/samples/code_samples import CodeSamplesUpdateStopWords1 from '/snippets/samples/code_samples_update_stop_words_1.mdx'; import CodeSamplesUpdateSynonyms1 from '/snippets/samples/code_samples_update_synonyms_1.mdx'; import CodeSamplesUpdateTypoTolerance1 from '/snippets/samples/code_samples_update_typo_tolerance_1.mdx'; +import CodeSamplesGetVectorStore1 from '/snippets/samples/code_samples_get_vector_store_1.mdx'; +import CodeSamplesUpdateVectorStore1 from '/snippets/samples/code_samples_update_vector_store_1.mdx'; +import CodeSamplesResetVectorStore1 from '/snippets/samples/code_samples_reset_vector_store_1.mdx'; Use the `/settings` route to customize search settings for a given index. You can either modify all index settings at once using the [update settings endpoint](#update-settings), or use a child route to configure a single setting. @@ -3053,7 +3056,6 @@ curl \ "chatCompletions": true }' ``` - The chat settings allow you to configure how your index integrates with Meilisearch's conversational search feature. @@ -3185,3 +3187,115 @@ curl \ ``` You can use the returned `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task). + +## Vector store + + +This is an experimental feature. Use the Meilisearch Cloud UI or the experimental features endpoint to activate it: + +```sh +curl \ + -X PATCH 'http://localhost:7700/experimental-features/' \ + -H 'Authorization: Bearer MEILISEARCH_API_KEY' \ + -H 'Content-Type: application/json' \ + --data-binary '{ + "vectorStoreSetting": true + }' +``` + + +Use `vectorStore` to switch between the `stable` and `experimental` vector store. + +The experimental vector store may improve performance in large Meilisearch databases that make heavy use of AI-powered search features. + +### Get vector store settings + + + +Get the vector store of an index. + +#### Path parameters + +| Name | Type | Description | +| :---------------- | :----- | :--------------------------------------------------------------------- | +| **`index_uid`** * | String | [`uid`](/learn/getting_started/indexes#index-uid) of the requested index | + +#### Example + + + +##### Response: `200 OK` + +```json +"stable" +``` + +### Update vector store settings + + + +Update the vector store of an index. + +When switching between vector stores, Meilisearch must convert all vector data for use with the new backend. This operation may take a significant amount of time in existing indexes. If a conversion is taking too long, create a new empty index, set its store to `experimental`, and add your documents. + +#### Path parameters + +| Name | Type | Description | +| :---------------- | :----- | :--------------------------------------------------------------------- | +| **`index_uid`** * | String | [`uid`](/learn/getting_started/indexes#index-uid) of the requested index | + +#### Body + +``` +"stable" | "experimental" +``` + +#### Example + + + +##### Response: `202 Accepted` + +```json +{ + "taskUid": 1, + "indexUid": "INDEX_UID", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-07-19T22:33:18.523881Z" +} +``` + +Use the returned `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task). + +### Reset vector store settings + + + +Reset an index's vector store to its default settings. + +If you had set `vectorStore` to anything other than the default value, resetting triggers a convertion operation. This operation may take a significant amount of time depending on the size of the index. + +#### Path parameters + +| Name | Type | Description | +| :---------------- | :----- | :--------------------------------------------------------------------- | +| **`index_uid`** * | String | [`uid`](/learn/getting_started/indexes#index-uid) of the requested index | + +#### Example + + + +##### Response: `202 Accepted` + +```json +{ + "taskUid": 1, + "indexUid": "INDEX_UID", + "status": "enqueued", + "type": "settingsUpdate", + "enqueuedAt": "2024-07-19T22:35:33.723983Z" +} +``` + +Use the returned `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task). From ee027a2a3f5a68628a8fe06dd9cd848d19a7326d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Thu, 11 Sep 2025 10:59:41 +0000 Subject: [PATCH 2/4] Update code samples [skip ci] --- .../code_samples_rename_an_index_1.mdx | 9 +++++ ...les_search_parameter_reference_media_1.mdx | 34 +++++++++++++++++++ .../code_samples_typo_tolerance_guide_5.mdx | 4 +++ 3 files changed, 47 insertions(+) create mode 100644 snippets/samples/code_samples_rename_an_index_1.mdx diff --git a/snippets/samples/code_samples_rename_an_index_1.mdx b/snippets/samples/code_samples_rename_an_index_1.mdx new file mode 100644 index 0000000000..c47acef515 --- /dev/null +++ b/snippets/samples/code_samples_rename_an_index_1.mdx @@ -0,0 +1,9 @@ + + +```bash cURL +curl \ + -X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \ + -H 'Content-Type: application/json' \ + --data-binary '{ "uid": "INDEX_B" }' +``` + \ No newline at end of file diff --git a/snippets/samples/code_samples_search_parameter_reference_media_1.mdx b/snippets/samples/code_samples_search_parameter_reference_media_1.mdx index 980280dd8c..0e6f821877 100644 --- a/snippets/samples/code_samples_search_parameter_reference_media_1.mdx +++ b/snippets/samples/code_samples_search_parameter_reference_media_1.mdx @@ -18,6 +18,40 @@ curl \ }' ``` +```javascript JS +client.index('INDEX_NAME').search('a futuristic movie', { + hybrid: { + embedder: 'EMBEDDER_NAME' + }, + media: { + textAndPoster: { + text: 'a futuristic movie', + image: { + mime: 'image/jpeg', + data: 'base64EncodedImageData' + } + } + } +}) +``` + +```php PHP +$client->index('INDEX_NAME')->search('a futuristic movie', [ + 'hybrid' => [ + 'embedder' => 'EMBEDDER_NAME' + ], + 'media' => [ + 'textAndPoster' => [ + 'text' => 'a futuristic movie', + 'image' => [ + 'mime' => 'image/jpeg', + 'data' => 'base64EncodedImageData' + ] + ] + ] +]); +``` + ```go Go client.Index("INDEX_NAME").Search("", &meilisearch.SearchRequest{ Hybrid: &meilisearch.SearchRequestHybrid{ diff --git a/snippets/samples/code_samples_typo_tolerance_guide_5.mdx b/snippets/samples/code_samples_typo_tolerance_guide_5.mdx index 55582c22bf..51bf8e70e6 100644 --- a/snippets/samples/code_samples_typo_tolerance_guide_5.mdx +++ b/snippets/samples/code_samples_typo_tolerance_guide_5.mdx @@ -27,6 +27,10 @@ $client->index('movies')->updateTypoTolerance([ ]); ``` +```ruby Ruby +index('books').update_typo_tolerance({ disable_on_numbers: true }) +``` + ```go Go client.Index("movies").UpdateTypoTolerance(&meilisearch.TypoTolerance{ DisableOnNumbers: true From 650f135f5aba00895d945943b1f4dda35e30cc95 Mon Sep 17 00:00:00 2001 From: gui machiavelli Date: Thu, 11 Sep 2025 17:26:38 +0200 Subject: [PATCH 3/4] Update reference/api/settings.mdx Co-authored-by: Louis Dureuil --- reference/api/settings.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/api/settings.mdx b/reference/api/settings.mdx index f60f1c5d08..6aa4246dc7 100644 --- a/reference/api/settings.mdx +++ b/reference/api/settings.mdx @@ -3191,7 +3191,7 @@ You can use the returned `taskUid` to get more details on [the status of the tas ## Vector store -This is an experimental feature. Use the Meilisearch Cloud UI or the experimental features endpoint to activate it: +This is an experimental feature. On Meilisearch Cloud, contact support to activate it. On OSS, use the experimental features endpoint: ```sh curl \ From 20dd5748fec87c7b4a06060d3d761860ceed567b Mon Sep 17 00:00:00 2001 From: gui machiavelli Date: Thu, 11 Sep 2025 18:14:52 +0200 Subject: [PATCH 4/4] add links to settings table --- reference/api/settings.mdx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/reference/api/settings.mdx b/reference/api/settings.mdx index 6aa4246dc7..7b20e66006 100644 --- a/reference/api/settings.mdx +++ b/reference/api/settings.mdx @@ -130,7 +130,8 @@ By default, the settings object looks like this. All fields are modifiable. "prefixSearch": "indexingTime", "searchCutoffMs": null, "embedders": {}, - "chat": {} + "chat": {}, + "vectorStore": "stable" } ``` @@ -201,7 +202,8 @@ Get the settings of an index. "prefixSearch": "indexingTime", "searchCutoffMs": null, "embedders": {}, - "chat": {} + "chat": {}, + "vectorStore": "stable" } ``` @@ -247,6 +249,7 @@ If the provided index does not exist, it will be created. | **[`typoTolerance`](#typo-tolerance)** | Object | [Default object](#typo-tolerance-object) | Typo tolerance settings | | **[`embedders`](#embedders)** | Object of objects | [Default object](#embedders-object) | Embedder required for performing meaning-based search queries | | **[`chat`](#conversation)** | Object | [Default object](#chat-object) | Chat settings for performing conversation-based queries | +| **[`vector-store`](#vector-store)** | String | `"stable"` | Vector store used for AI-powered search | #### Example