Skip to content

Commit 329dd8a

Browse files
Merge branch 'main' into CaroFG-patch-2
2 parents 37b6646 + 9375217 commit 329dd8a

9 files changed

Lines changed: 102 additions & 11 deletions

.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' \

guides/docker.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Docker is a tool that bundles applications into containers. Docker containers en
1212
Docker containers are distributed in images. To use Meilisearch, use the `docker pull` command to download a Meilisearch image:
1313

1414
```sh
15-
docker pull getmeili/meilisearch:v1.16
15+
docker pull getmeili/meilisearch:latest
1616
```
1717

1818
Meilisearch deploys a new Docker image with every release of the engine. Each image is tagged with the corresponding Meilisearch version, indicated in the above example by the text following the `:` symbol. You can see [the full list of available Meilisearch Docker images](https://hub.docker.com/r/getmeili/meilisearch/tags#!) on Docker Hub.
@@ -29,7 +29,7 @@ After completing the previous step, use `docker run` to launch the Meilisearch i
2929
docker run -it --rm \
3030
-p 7700:7700 \
3131
-v $(pwd)/meili_data:/meili_data \
32-
getmeili/meilisearch:v1.16
32+
getmeili/meilisearch:latest
3333
```
3434

3535
### Configure Meilisearch
@@ -45,7 +45,7 @@ docker run -it --rm \
4545
-p 7700:7700 \
4646
-e MEILI_MASTER_KEY='MASTER_KEY'\
4747
-v $(pwd)/meili_data:/meili_data \
48-
getmeili/meilisearch:v1.16
48+
getmeili/meilisearch:latest
4949
```
5050

5151
#### Passing instance options with CLI arguments
@@ -56,7 +56,7 @@ If you want to pass command-line arguments to Meilisearch with Docker, you must
5656
docker run -it --rm \
5757
-p 7700:7700 \
5858
-v $(pwd)/meili_data:/meili_data \
59-
getmeili/meilisearch:v1.16 \
59+
getmeili/meilisearch:latest \
6060
meilisearch --master-key="MASTER_KEY"
6161
```
6262

@@ -74,7 +74,7 @@ To keep your data intact between reboots, specify a dedicated volume by running
7474
docker run -it --rm \
7575
-p 7700:7700 \
7676
-v $(pwd)/meili_data:/meili_data \
77-
getmeili/meilisearch:v1.16
77+
getmeili/meilisearch:latest
7878
```
7979

8080
The example above uses `$(pwd)/meili_data`, which is a directory in the host machine. Depending on your OS, mounting volumes from the host to the container might result in performance loss and is only recommended when developing your application.
@@ -89,7 +89,7 @@ To import a dump, use Meilisearch's `--import-dump` command-line option and spec
8989
docker run -it --rm \
9090
-p 7700:7700 \
9191
-v $(pwd)/meili_data:/meili_data \
92-
getmeili/meilisearch:v1.16 \
92+
getmeili/meilisearch:latest \
9393
meilisearch --import-dump /meili_data/dumps/20200813-042312213.dump
9494
```
9595

@@ -109,7 +109,7 @@ To generate a Meilisearch snapshot with Docker, launch Meilisearch with `--sched
109109
docker run -it --rm \
110110
-p 7700:7700 \
111111
-v $(pwd)/meili_data:/meili_data \
112-
getmeili/meilisearch:v1.16 \
112+
getmeili/meilisearch:latest \
113113
meilisearch --schedule-snapshot --snapshot-dir /meili_data/snapshots
114114
```
115115

@@ -121,7 +121,7 @@ To import a snapshot, launch Meilisearch with the `--import-snapshot` option:
121121
docker run -it --rm \
122122
-p 7700:7700 \
123123
-v $(pwd)/meili_data:/meili_data \
124-
getmeili/meilisearch:v1.16 \
124+
getmeili/meilisearch:latest \
125125
meilisearch --import-snapshot /meili_data/snapshots/data.ms.snapshot
126126
```
127127

reference/api/search.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,6 +1268,10 @@ If `q` is missing and `semanticRatio` is explicitly set to `0`, Meilisearch perf
12681268

12691269
Return document and query embeddings with search results. If `true`, Meilisearch will display vector data in each [document's `_vectors` field](/reference/api/documents#_vectors).
12701270

1271+
<Warning>
1272+
`_vectors` must be included in the [displayedAttributes](/reference/api/settings#displayed-attributes) list to be returned in the response.
1273+
</Warning>
1274+
12711275
#### Example
12721276

12731277
<CodeSamplesSearchParameterReferenceRetrieveVectors1 />
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<CodeGroup>
2+
3+
```bash cURL
4+
curl \
5+
-X POST 'MEILISEARCH_URL/indexes/movies/documents/edit' \
6+
-H 'Content-Type: application/json' \
7+
--data-binary '{
8+
"function": "doc.new_field = `a]new[value`",
9+
"filter": "id > 3000",
10+
"context": {
11+
"max_title_length": 10
12+
}
13+
}'
14+
```
15+
</CodeGroup>
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_NAME/settings/chat'
6+
```
7+
</CodeGroup>

snippets/samples/code_samples_get_network_1.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ curl \
55
-X GET 'MEILISEARCH_URL/network'
66
```
77

8+
```python Python
9+
client.get_all_networks()
10+
```
11+
812
```php PHP
913
$client->getNetwork();
1014
```
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_NAME/settings/chat'
6+
```
7+
</CodeGroup>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<CodeGroup>
2+
3+
```bash cURL
4+
curl \
5+
-X PATCH 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/chat' \
6+
-H 'Content-Type: application/json' \
7+
--data-binary '{
8+
"description": "An index of movies.",
9+
"documentTemplate": "A movie titled '{{doc.title}}' released in {{ doc.release_date }}",
10+
"documentTemplateMaxBytes": 400
11+
}'
12+
```
13+
</CodeGroup>

snippets/samples/code_samples_update_network_1.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ curl \
1919
}'
2020
```
2121

22+
```python Python
23+
client.add_or_update_networks({
24+
"remotes": {
25+
"http://localhost:7700": {
26+
"searchApiKey": "masterKey"
27+
}
28+
},
29+
"leader": None
30+
})
31+
```
32+
2233
```php PHP
2334
$client->updateNetwork([
2435
'self' => 'ms-00',

0 commit comments

Comments
 (0)