Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
2 changes: 1 addition & 1 deletion learn/resources/experimental_features_overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
11 changes: 7 additions & 4 deletions reference/api/experimental_features.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand All @@ -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

Expand All @@ -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
}
```

Expand Down Expand Up @@ -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
}
```
123 changes: 120 additions & 3 deletions reference/api/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -127,7 +130,8 @@ By default, the settings object looks like this. All fields are modifiable.
"prefixSearch": "indexingTime",
"searchCutoffMs": null,
"embedders": {},
"chat": {}
"chat": {},
"vectorStore": "stable"
}
```

Expand Down Expand Up @@ -198,7 +202,8 @@ Get the settings of an index.
"prefixSearch": "indexingTime",
"searchCutoffMs": null,
"embedders": {},
"chat": {}
"chat": {},
"vectorStore": "stable"
}
```

Expand Down Expand Up @@ -244,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)** <NoticeTag type="experimental" label="experimental" /> | Object | [Default object](#chat-object) | Chat settings for performing conversation-based queries |
| **[`vector-store`](#vector-store)** <NoticeTag type="experimental" label="experimental" /> | String | `"stable"` | Vector store used for AI-powered search |

#### Example

Expand Down Expand Up @@ -3053,7 +3059,6 @@ curl \
"chatCompletions": true
}'
```

</Note>

The chat settings allow you to configure how your index integrates with Meilisearch's conversational search feature.
Expand Down Expand Up @@ -3185,3 +3190,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 <NoticeTag type="experimental" label="experimental" />

<Note>
This is an experimental feature. On Meilisearch Cloud, contact support to activate it. On OSS, use the experimental features endpoint:

```sh
curl \
-X PATCH 'http://localhost:7700/experimental-features/' \
-H 'Authorization: Bearer MEILISEARCH_API_KEY' \
-H 'Content-Type: application/json' \
--data-binary '{
"vectorStoreSetting": true
}'
```
</Note>

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

<RouteHighlighter method="GET" path="/indexes/{index_uid}/settings/vector-store" />

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

<CodeSamplesGetVectorStoreSettings1 />

##### Response: `200 OK`

```json
"stable"
```

### Update vector store settings

<RouteHighlighter method="PUT" path="/indexes/{index_uid}/settings/vector-store" />

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

<CodeSamplesUpdateVectorStoreSettings1 />

##### 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

<RouteHighlighter method="DELETE" path="/indexes/{index_uid}/settings/vector-store" />

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

<CodeSamplesResetFacetSearchSettings1 />

##### 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).
9 changes: 9 additions & 0 deletions snippets/samples/code_samples_rename_an_index_1.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<CodeGroup>

```bash cURL
curl \
-X PATCH 'MEILISEARCH_URL/indexes/INDEX_A' \
-H 'Content-Type: application/json' \
--data-binary '{ "uid": "INDEX_B" }'
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
4 changes: 4 additions & 0 deletions snippets/samples/code_samples_typo_tolerance_guide_5.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down