Skip to content

Commit 4296322

Browse files
Merge branch 'main' into add-search-personalization-page
2 parents fbef9cb + f1562b2 commit 4296322

13 files changed

+191
-13
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'

docs.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,6 @@
453453
"segment": {
454454
"key": "KIC0Lcb5C9ssRY79dUKPOK8Wq6wLHiUP"
455455
},
456-
"ga4": {
457-
"measurementId": "G-S0LFS24LR2"
458-
},
459456
"gtm": {
460457
"tagId": "GTM-TNSCGVBH"
461458
}

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: 120 additions & 3 deletions
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

@@ -127,7 +130,8 @@ By default, the settings object looks like this. All fields are modifiable.
127130
"prefixSearch": "indexingTime",
128131
"searchCutoffMs": null,
129132
"embedders": {},
130-
"chat": {}
133+
"chat": {},
134+
"vectorStore": "stable"
131135
}
132136
```
133137

@@ -198,7 +202,8 @@ Get the settings of an index.
198202
"prefixSearch": "indexingTime",
199203
"searchCutoffMs": null,
200204
"embedders": {},
201-
"chat": {}
205+
"chat": {},
206+
"vectorStore": "stable"
202207
}
203208
```
204209

@@ -244,6 +249,7 @@ If the provided index does not exist, it will be created.
244249
| **[`typoTolerance`](#typo-tolerance)** | Object | [Default object](#typo-tolerance-object) | Typo tolerance settings |
245250
| **[`embedders`](#embedders)** | Object of objects | [Default object](#embedders-object) | Embedder required for performing meaning-based search queries |
246251
| **[`chat`](#conversation)** <NoticeTag type="experimental" label="experimental" /> | Object | [Default object](#chat-object) | Chat settings for performing conversation-based queries |
252+
| **[`vector-store`](#vector-store)** <NoticeTag type="experimental" label="experimental" /> | String | `"stable"` | Vector store used for AI-powered search |
247253

248254
#### Example
249255

@@ -3053,7 +3059,6 @@ curl \
30533059
"chatCompletions": true
30543060
}'
30553061
```
3056-
30573062
</Note>
30583063

30593064
The chat settings allow you to configure how your index integrates with Meilisearch's conversational search feature.
@@ -3185,3 +3190,115 @@ curl \
31853190
```
31863191

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

snippets/samples/code_samples_primary_field_guide_update_document_primary_key.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ client.index('books').update(primary_key: 'title')
3030
```
3131

3232
```go Go
33-
client.Index("books").UpdateIndex("title")
33+
client.Index("books").UpdateIndex(&meilisearch.UpdateIndexRequestParams{
34+
PrimaryKey: "title",
35+
})
3436
```
3537

3638
```csharp C#
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<CodeGroup>
2+
3+
```bash cURL
4+
curl \
5+
-X DELETE 'MEILISEARCH_URL/indexes/INDEX_UID/settings/vector-store'
6+
```
7+
</CodeGroup>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<CodeGroup>
2+
3+
```go Go
4+
client.SwapIndexes([]SwapIndexesParams{
5+
{Indexes: []string{"indexA", "indexB"}, Rename: true},
6+
{Indexes: []string{"indexX", "indexY"}, Rename: true},
7+
})
8+
```
9+
</CodeGroup>

snippets/samples/code_samples_typo_tolerance_guide_5.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ $client->index('movies')->updateTypoTolerance([
2727
]);
2828
```
2929

30+
```java Java
31+
TypoTolerance typoTolerance = new TypoTolerance();
32+
typoTolerance.setDisableOnNumbers(true);
33+
client.index("movies").updateTypoToleranceSettings(typoTolerance);
34+
```
35+
3036
```ruby Ruby
3137
index('books').update_typo_tolerance({ disable_on_numbers: true })
3238
```

0 commit comments

Comments
 (0)