Skip to content

Commit d524775

Browse files
add new experimental feature
1 parent 885456e commit d524775

File tree

4 files changed

+134
-6
lines changed

4 files changed

+134
-6
lines changed

.code-samples.meilisearch.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1596,3 +1596,14 @@ search_parameter_reference_media_1: |-
15961596
}
15971597
}
15981598
}'
1599+
get_vector_store_settings_1: |-
1600+
curl \
1601+
-X GET 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'
1602+
update_vector_store_settings_1: |-
1603+
curl \
1604+
-X PUT 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store' \
1605+
-H 'Content-Type: application/json' \
1606+
--data-binary '"experimental"'
1607+
reset_vector_store_settings_1: |-
1608+
curl \
1609+
-X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'

learn/resources/experimental_features_overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ Activating or deactivating experimental features this way does not require you t
6161
| [Maximum batch payload size](/learn/self_hosted/configure_meilisearch_at_launch#maximum-batch-payload-size) | Limit batch payload size | CLI flag or environment variable |
6262
| [Multimodal search](/reference/api/settings) | Enable multimodal search | API route |
6363
| [Disable new indexer](/learn/self_hosted/configure_meilisearch_at_launch) | Use previous settings indexer | CLI flag or environment variable |
64-
64+
| [Experimental vector store](/reference/api/settings) | Enables index setting to use experimental vector store | API route |

reference/api/experimental_features.mdx

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@ The experimental API route is not compatible with all experimental features. Con
2727
"editDocumentsByFunction": false,
2828
"network": false,
2929
"chatCompletions": false,
30-
"multimodal": false
30+
"multimodal": false,
31+
"vectorStoreSetting": false
3132
}
3233
```
3334

@@ -40,6 +41,7 @@ The experimental API route is not compatible with all experimental features. Con
4041
| **`network`** | Boolean | `true` if feature is active, `false` otherwise |
4142
| **`chatCompletions`** | Boolean | `true` if feature is active, `false` otherwise |
4243
| **`multimodal`** | Boolean | `true` if feature is active, `false` otherwise |
44+
| **`vectorStoreSetting`** | Boolean | `true` if feature is active, `false` otherwise |
4345

4446
## Get all experimental features
4547

@@ -61,7 +63,8 @@ Get a list of all experimental features that can be activated via the `/experime
6163
"editDocumentsByFunction": false,
6264
"network": false,
6365
"chatCompletions": false,
64-
"multimodal": false
66+
"multimodal": false,
67+
"vectorStoreSetting": false
6568
}
6669
```
6770

@@ -90,7 +93,7 @@ Setting a field to `null` leaves its value unchanged.
9093
"containsFilter": false,
9194
"editDocumentsByFunction": false,
9295
"network": false,
93-
"chatCompletions": false,
94-
"multimodal": false
96+
"multimodal": false,
97+
"vectorStoreSetting": false
9598
}
9699
```

reference/api/settings.mdx

Lines changed: 115 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ import CodeSamplesUpdateSortableAttributes1 from '/snippets/samples/code_samples
6969
import CodeSamplesUpdateStopWords1 from '/snippets/samples/code_samples_update_stop_words_1.mdx';
7070
import CodeSamplesUpdateSynonyms1 from '/snippets/samples/code_samples_update_synonyms_1.mdx';
7171
import CodeSamplesUpdateTypoTolerance1 from '/snippets/samples/code_samples_update_typo_tolerance_1.mdx';
72+
import CodeSamplesGetVectorStore1 from '/snippets/samples/code_samples_get_vector_store_1.mdx';
73+
import CodeSamplesUpdateVectorStore1 from '/snippets/samples/code_samples_update_vector_store_1.mdx';
74+
import CodeSamplesResetVectorStore1 from '/snippets/samples/code_samples_reset_vector_store_1.mdx';
7275

7376
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.
7477

@@ -3053,7 +3056,6 @@ curl \
30533056
"chatCompletions": true
30543057
}'
30553058
```
3056-
30573059
</Note>
30583060

30593061
The chat settings allow you to configure how your index integrates with Meilisearch's conversational search feature.
@@ -3185,3 +3187,115 @@ curl \
31853187
```
31863188

31873189
You can use the returned `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task).
3190+
3191+
## Vector store <NoticeTag type="experimental" label="experimental" />
3192+
3193+
<Note>
3194+
This is an experimental feature. Use the Meilisearch Cloud UI or the experimental features endpoint to activate it:
3195+
3196+
```sh
3197+
curl \
3198+
-X PATCH 'http://localhost:7700/experimental-features/' \
3199+
-H 'Authorization: Bearer MEILISEARCH_API_KEY' \
3200+
-H 'Content-Type: application/json' \
3201+
--data-binary '{
3202+
"vectorStoreSetting": true
3203+
}'
3204+
```
3205+
</Note>
3206+
3207+
Use `vectorStore` to switch between the `stable` and `experimental` vector store.
3208+
3209+
The experimental vector store may improve performance in large Meilisearch databases that make heavy use of AI-powered search features.
3210+
3211+
### Get vector store settings
3212+
3213+
<RouteHighlighter method="GET" path="/indexes/{index_uid}/settings/vector-store" />
3214+
3215+
Get the vector store of an index.
3216+
3217+
#### Path parameters
3218+
3219+
| Name | Type | Description |
3220+
| :---------------- | :----- | :--------------------------------------------------------------------- |
3221+
| **`index_uid`** * | String | [`uid`](/learn/getting_started/indexes#index-uid) of the requested index |
3222+
3223+
#### Example
3224+
3225+
<CodeSamplesGetVectorStoreSettings1 />
3226+
3227+
##### Response: `200 OK`
3228+
3229+
```json
3230+
"stable"
3231+
```
3232+
3233+
### Update vector store settings
3234+
3235+
<RouteHighlighter method="PUT" path="/indexes/{index_uid}/settings/vector-store" />
3236+
3237+
Update the vector store of an index.
3238+
3239+
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.
3240+
3241+
#### Path parameters
3242+
3243+
| Name | Type | Description |
3244+
| :---------------- | :----- | :--------------------------------------------------------------------- |
3245+
| **`index_uid`** * | String | [`uid`](/learn/getting_started/indexes#index-uid) of the requested index |
3246+
3247+
#### Body
3248+
3249+
```
3250+
"stable" | "experimental"
3251+
```
3252+
3253+
#### Example
3254+
3255+
<CodeSamplesUpdateVectorStoreSettings1 />
3256+
3257+
##### Response: `202 Accepted`
3258+
3259+
```json
3260+
{
3261+
"taskUid": 1,
3262+
"indexUid": "INDEX_UID",
3263+
"status": "enqueued",
3264+
"type": "settingsUpdate",
3265+
"enqueuedAt": "2024-07-19T22:33:18.523881Z"
3266+
}
3267+
```
3268+
3269+
Use the returned `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task).
3270+
3271+
### Reset vector store settings
3272+
3273+
<RouteHighlighter method="DELETE" path="/indexes/{index_uid}/settings/vector-store" />
3274+
3275+
Reset an index's vector store to its default settings.
3276+
3277+
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.
3278+
3279+
#### Path parameters
3280+
3281+
| Name | Type | Description |
3282+
| :---------------- | :----- | :--------------------------------------------------------------------- |
3283+
| **`index_uid`** * | String | [`uid`](/learn/getting_started/indexes#index-uid) of the requested index |
3284+
3285+
#### Example
3286+
3287+
<CodeSamplesResetFacetSearchSettings1 />
3288+
3289+
##### Response: `202 Accepted`
3290+
3291+
```json
3292+
{
3293+
"taskUid": 1,
3294+
"indexUid": "INDEX_UID",
3295+
"status": "enqueued",
3296+
"type": "settingsUpdate",
3297+
"enqueuedAt": "2024-07-19T22:35:33.723983Z"
3298+
}
3299+
```
3300+
3301+
Use the returned `taskUid` to get more details on [the status of the task](/reference/api/tasks#get-one-task).

0 commit comments

Comments
 (0)