Skip to content

Commit 0df6b08

Browse files
Merge branch 'main' into create-experimental-api-routes
2 parents 19d2f75 + 9e8fbc6 commit 0df6b08

File tree

17 files changed

+248
-44
lines changed

17 files changed

+248
-44
lines changed

.code-samples.meilisearch.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1311,11 +1311,12 @@ get_similar_post_1: |-
13111311
-H 'Content-Type: application/json' \
13121312
-H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \
13131313
--data-binary '{
1314-
"id": TARGET_DOCUMENT_ID
1314+
"id": TARGET_DOCUMENT_ID,
1315+
"embedder": "EMBEDDER_NAME"
13151316
}'
13161317
get_similar_get_1: |-
13171318
curl \
1318-
-X GET 'http://localhost:7700/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID'
1319+
-X GET 'http://localhost:7700/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME'
13191320
search_parameter_reference_ranking_score_threshold_1: |-
13201321
curl \
13211322
-X POST 'http://localhost:7700/indexes/INDEX_NAME/search' \
@@ -1329,7 +1330,7 @@ search_parameter_reference_locales_1: |-
13291330
-X POST 'http://localhost:7700/indexes/INDEX_NAME/search' \
13301331
-H 'Content-Type: application/json' \
13311332
--data-binary '{
1332-
"q": "進撃の巨人",
1333+
"q": "QUERY TEXT IN JAPANESE",
13331334
"locales": ["jpn"]
13341335
}'
13351336
get_localized_attribute_settings_1: |-
@@ -1376,21 +1377,24 @@ search_parameter_guide_hybrid_1: |-
13761377
"q": "kitchen utensils",
13771378
"hybrid": {
13781379
"semanticRatio": 0.9,
1379-
"embedder": "default"
1380+
"embedder": "EMBEDDER_NAME"
13801381
}
13811382
}'
13821383
search_parameter_guide_vector_1: |-
13831384
curl -X POST 'localhost:7700/indexes/INDEX_NAME/search' \
13841385
-H 'content-type: application/json' \
1385-
--data-binary '{ "vector": [0, 1, 2] }'
1386+
--data-binary '{
1387+
"vector": [0, 1, 2],
1388+
"embedder": "EMBEDDER_NAME"
1389+
}'
13861390
search_parameter_reference_retrieve_vectors_1: |-
13871391
curl -X POST 'localhost:7700/indexes/INDEX_NAME/search' \
13881392
-H 'content-type: application/json' \
13891393
--data-binary '{
13901394
"q": "kitchen utensils",
13911395
"retrieveVectors": true,
13921396
"hybrid": {
1393-
"embedder": "default"
1397+
"embedder": "EMBEDDER_NAME"
13941398
}
13951399
}'
13961400
experimental_get_metrics_1: |-
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Add PR to Code Samples Changes project
2+
3+
on:
4+
pull_request:
5+
types: [opened, edited, synchronize]
6+
paths:
7+
- .code-samples.meilisearch.yaml
8+
9+
jobs:
10+
add-pr-to-project:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/add-to-project@f5473ace9aeee8b97717b281e26980aa5097023f
14+
with:
15+
project-url: https://github.com/orgs/meilisearch/projects/44
16+
github-token: ${{ secrets.GH_TOKEN }}

assets/misc/meilisearch-collection-postman.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"info": {
3-
"_postman_id": "719caa45-6643-4393-9b84-e8bc6a70d074",
4-
"name": "Meilisearch v1.10",
3+
"_postman_id": "cc6bb097-033d-4f65-8704-f10e4e4b10d0",
4+
"name": "Meilisearch v1.11",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
6-
"_exporter_id": "8898306"
6+
"_exporter_id": "25294324"
77
},
88
"item": [
99
{

guides/docker.mdx

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

1616
```sh
17-
docker pull getmeili/meilisearch:v1.10
17+
docker pull getmeili/meilisearch:v1.11
1818
```
1919

2020
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.
@@ -31,7 +31,7 @@ After completing the previous step, use `docker run` to launch the Meilisearch i
3131
docker run -it --rm \
3232
-p 7700:7700 \
3333
-v $(pwd)/meili_data:/meili_data \
34-
getmeili/meilisearch:v1.10
34+
getmeili/meilisearch:v1.11
3535
```
3636

3737
### Configure Meilisearch
@@ -47,7 +47,7 @@ docker run -it --rm \
4747
-p 7700:7700 \
4848
-e MEILI_MASTER_KEY='MASTER_KEY'\
4949
-v $(pwd)/meili_data:/meili_data \
50-
getmeili/meilisearch:v1.10
50+
getmeili/meilisearch:v1.11
5151
```
5252

5353
#### Passing instance options with CLI arguments
@@ -58,7 +58,7 @@ If you want to pass command-line arguments to Meilisearch with Docker, you must
5858
docker run -it --rm \
5959
-p 7700:7700 \
6060
-v $(pwd)/meili_data:/meili_data \
61-
getmeili/meilisearch:v1.10 \
61+
getmeili/meilisearch:v1.11 \
6262
meilisearch --master-key="MASTER_KEY"
6363
```
6464

@@ -76,7 +76,7 @@ To keep your data intact between reboots, specify a dedicated volume by running
7676
docker run -it --rm \
7777
-p 7700:7700 \
7878
-v $(pwd)/meili_data:/meili_data \
79-
getmeili/meilisearch:v1.10
79+
getmeili/meilisearch:v1.11
8080
```
8181

8282
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.
@@ -91,7 +91,7 @@ To import a dump, use Meilisearch's `--import-dump` command-line option and spec
9191
docker run -it --rm \
9292
-p 7700:7700 \
9393
-v $(pwd)/meili_data:/meili_data \
94-
getmeili/meilisearch:v1.10 \
94+
getmeili/meilisearch:v1.11 \
9595
meilisearch --import-dump /meili_data/dumps/20200813-042312213.dump
9696
```
9797

@@ -111,7 +111,7 @@ To generate a Meilisearch snapshot with Docker, launch Meilisearch with `--sched
111111
docker run -it --rm \
112112
-p 7700:7700 \
113113
-v $(pwd)/meili_data:/meili_data \
114-
getmeili/meilisearch:v1.10 \
114+
getmeili/meilisearch:v1.11 \
115115
meilisearch --schedule-snapshot --snapshot-dir /meili_data/snapshots
116116
```
117117

@@ -123,7 +123,7 @@ To import a snapshot, launch Meilisearch with the `--import-snapshot` option:
123123
docker run -it --rm \
124124
-p 7700:7700 \
125125
-v $(pwd)/meili_data:/meili_data \
126-
getmeili/meilisearch:v1.10 \
126+
getmeili/meilisearch:v1.11 \
127127
meilisearch --import-snapshot /meili_data/snapshots/data.ms.snapshot
128128
```
129129

guides/running_production.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Next, you need to make the binary accessible from anywhere in your system. Move
4646
mv ./meilisearch /usr/local/bin/
4747
```
4848

49-
Meilisearch is now running, but it is not publicly accessible.
49+
Meilisearch is now installed in your system, but it is not publicly accessible.
5050

5151
## Step 2: Create system user
5252

@@ -56,6 +56,12 @@ Running applications as root exposes you to unnecessary security risks. To preve
5656
useradd -d /var/lib/meilisearch -s /bin/false -m -r meilisearch
5757
```
5858

59+
Then give the new user ownership of the Meilisearch binary:
60+
61+
```sh
62+
chown meilisearch:meilisearch /usr/local/bin/meilisearch
63+
```
64+
5965
## Step 3: Create a configuration file
6066

6167
After installing Meilisearch and taking the first step towards keeping your data safe, you need to set up a basic configuration file.

learn/ai_powered_search/getting_started_with_ai_search.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ curl \
5050

5151
Next, you must generate vector embeddings for all documents in your dataset. Embeddings are mathematical representations of the meanings of words and sentences in your documents. Meilisearch relies on external providers to generate these embeddings. This tutorial uses an OpenAI embedder, but Meilisearch also supports embedders from HuggingFace, Ollama, and any embedder accessible via a RESTful API.
5252

53-
Use the `embedders` index setting of the [update `/settings` endpoint](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=vector-search-guide) to configure a default [OpenAI](https://platform.openai.com/) embedder:
53+
Use the `embedders` index setting of the [update `/settings` endpoint](/reference/api/settings?utm_campaign=vector-search&utm_source=docs&utm_medium=vector-search-guide) to configure an [OpenAI](https://platform.openai.com/) embedder:
5454

5555
```sh
5656
curl \
5757
-X PATCH 'http://localhost:7700/indexes/kitchenware/settings' \
5858
-H 'Content-Type: application/json' \
5959
--data-binary '{
6060
"embedders": {
61-
"default": {
61+
"openai": {
6262
"source": "openAi",
6363
"apiKey": "OPEN_AI_API_KEY",
6464
"model": "text-embedding-3-small",
@@ -91,7 +91,7 @@ curl \
9191
--data-binary '{
9292
"q": "kitchen utensils made of wood",
9393
"hybrid": {
94-
"embedder": "default",
94+
"embedder": "openai",
9595
"semanticRatio": 0.7
9696
}
9797
}'

learn/filtering_and_sorting/filter_expression_reference.mdx

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ NOT genres IN [horror, comedy]
161161

162162
`CONTAINS` filters results containing partial matches to the specified string pattern, similar to a [SQL `LIKE`](https://dev.mysql.com/doc/refman/8.4/en/string-comparison-functions.html#operator_like).
163163

164-
The following expression returns all dairy products whose name start with `"kef"`, such as kefir:
164+
The following expression returns all dairy products whose names contain `"kef"`:
165165

166166
```
167167
dairy_products.name CONTAINS kef
@@ -185,6 +185,40 @@ curl \
185185
"containsFilter": true
186186
}'
187187
```
188+
189+
This will also enable the [`STARTS WITH`](#starts-with) operator.
190+
</Capsule>
191+
192+
### `STARTS WITH` <NoticeTag type="experimental" label="experimental" />
193+
194+
`STARTS WITH` filters results whose values start with the specified string pattern.
195+
196+
The following expression returns all dairy products whose name start with `"kef"`:
197+
198+
```
199+
dairy_products.name STARTS WITH kef
200+
```
201+
202+
The negated form of the above expression can be written as:
203+
204+
```
205+
dairy_products.name NOT STARTS WITH kef
206+
NOT dairy_product.name STARTS WITH kef
207+
```
208+
209+
<Capsule intent="note" title="Activating `STARTS WITH`">
210+
This is an experimental feature. Use the experimental features endpoint to activate it:
211+
212+
```sh
213+
curl \
214+
-X PATCH 'http://localhost:7700/experimental-features/' \
215+
-H 'Content-Type: application/json' \
216+
--data-binary '{
217+
"containsFilter": true
218+
}'
219+
```
220+
221+
This will also enable the [`CONTAINS`](#contains) operator.
188222
</Capsule>
189223

190224
### `NOT`

learn/indexing/indexing_best_practices.mdx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,13 @@ If you have followed the previous tips in this guide and are still experiencing
6060
Indexing is a memory-intensive and multi-threaded operation. The more memory and processor cores available, the faster Meilisearch will index new documents. When trying to improve indexing speed, using a machine with more processor cores is more effective than increasing RAM.
6161

6262
Due to how Meilisearch works, it is best to avoid HDDs (Hard Disk Drives) as they can easily become performance bottlenecks.
63+
64+
## Enable binary quantization when using AI-powered search
65+
66+
If you are experiencing performance issues when indexing documents for AI-powered search, consider enabling [binary quantization](/reference/api/settings#binaryquantized) for your embedders. Binary quantization compresses vectors by representing each dimension with 1-bit values. This reduces the relevancy of semantic search results, but greatly improves performance.
67+
68+
Binary quantization works best with large datasets containing more than 1M documents and using models with more than 1400 dimensions.
69+
70+
<Capsule intent="danger" title="Binary quantization is an irreversible process">
71+
**Activating binary quantization is irreversible.** Once enabled, Meilisearch converts all vectors and discards all vector data that does fit within 1-bit. The only way to recover the vectors' original values is to re-vectorize the whole index in a new embedder.
72+
</Capsule>

learn/resources/telemetry.mdx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,13 +240,14 @@ This list is liable to change with every new version of Meilisearch. It's not be
240240
| `vector_store` | `true` if the vector store feature is enabled, otherwise `false` | true
241241
| `attributes_to_search_on.total_number_of_uses` | `true` if the vector store feature is enabled, otherwise `false` | true
242242
| `vector.max_vector_size` | Highest number of dimensions given for the `vector` parameter in this batch | 1536
243-
| `vector.retrieve_vectors` | true if the retrieve_vectors parameter has been used in this batch. | false |
243+
| `vector.retrieve_vectors` | true if the retrieve_vectors parameter has been used in this batch. | false
244244
| `hybrid.enabled` | `true` if hybrid search been used in the aggregated event, otherwise `false` | true
245245
| `hybrid.semantic_ratio` | `true` if semanticRatio was used in this batch, otherwise false | false
246-
| `hybrid.embedder` | `true` if a specific embedder was used in this batch, otherwise false | true
247246
| `embedders.total` | Numbers of defined embedders | 2
248247
| `embedders.sources` | An array representing the different provided sources | [”huggingFace”, “userProvided”]
249248
| `embedders.document_template_used` | A boolean indicating if one of the provided embedders has a custom template defined | true
249+
| `embedders.document_template_max_bytes` | a value indicating the largest value for document TemplateMaxBytes across all embedder | 400
250+
| `embedders.binary_quantization_used` | `true` if the user updated the binary quantized field of the embedded settings | `false`
250251
| `infos.task_queue_webhook` | `true` if the instance is launched with a task queue webhook, otherwise `false` | `false`
251252
| `infos.experimental_search_queue_size` | Size of the search queue | 750
252253
| `locales` | List of locales used with `/search` and `/settings` routes | [”fra”, “eng”]

learn/self_hosted/install_meilisearch_locally.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,14 @@ These commands launch the **latest stable release** of Meilisearch.
5454

5555
```bash
5656
# Fetch the latest version of Meilisearch image from DockerHub
57-
docker pull getmeili/meilisearch:v1.10
57+
docker pull getmeili/meilisearch:v1.11
5858

5959
# Launch Meilisearch in development mode with a master key
6060
docker run -it --rm \
6161
-p 7700:7700 \
6262
-e MEILI_ENV='development' \
6363
-v $(pwd)/meili_data:/meili_data \
64-
getmeili/meilisearch:v1.10
64+
getmeili/meilisearch:v1.11
6565
# Use ${pwd} instead of $(pwd) in PowerShell
6666
```
6767

0 commit comments

Comments
 (0)