Skip to content

Commit 57e795e

Browse files
authored
Merge pull request #2998 from meilisearch/v1.11
v1.11
2 parents cfb4735 + 75567ed commit 57e795e

File tree

13 files changed

+220
-36
lines changed

13 files changed

+220
-36
lines changed

.code-samples.meilisearch.yaml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,13 +1242,16 @@ search_parameter_guide_hybrid_1: |-
12421242
"q": "kitchen utensils",
12431243
"hybrid": {
12441244
"semanticRatio": 0.9,
1245-
"embedder": "default"
1245+
"embedder": "EMBEDDER_NAME"
12461246
}
12471247
}'
12481248
search_parameter_guide_vector_1: |-
12491249
curl -X POST 'localhost:7700/indexes/INDEX_NAME/search' \
12501250
-H 'content-type: application/json' \
1251-
--data-binary '{ "vector": [0, 1, 2] }'
1251+
--data-binary '{
1252+
"vector": [0, 1, 2],
1253+
"embedder": "EMBEDDER_NAME"
1254+
}'
12521255
get_search_cutoff_1: |-
12531256
curl \
12541257
-X GET 'http://localhost:7700/indexes/movies/settings/search-cutoff-ms'
@@ -1321,7 +1324,7 @@ search_parameter_reference_retrieve_vectors_1: |-
13211324
"q": "kitchen utensils",
13221325
"retrieveVectors": true,
13231326
"hybrid": {
1324-
"embedder": "default"
1327+
"embedder": "EMBEDDER_NAME"
13251328
}
13261329
}'
13271330
search_parameter_reference_distinct_1: |-
@@ -1355,11 +1358,12 @@ get_similar_post_1: |-
13551358
-H 'Content-Type: application/json' \
13561359
-H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \
13571360
--data-binary '{
1358-
"id": TARGET_DOCUMENT_ID
1361+
"id": TARGET_DOCUMENT_ID,
1362+
"embedder": "EMBEDDER_NAME"
13591363
}'
13601364
get_similar_get_1: |-
13611365
curl \
1362-
-X GET 'http://localhost:7700/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID'
1366+
-X GET 'http://localhost:7700/indexes/INDEX_NAME/similar?id=TARGET_DOCUMENT_ID&embedder=EMBEDDER_NAME'
13631367
search_parameter_reference_ranking_score_threshold_1: |-
13641368
curl \
13651369
-X POST 'http://localhost:7700/indexes/INDEX_NAME/search' \
@@ -1373,7 +1377,7 @@ search_parameter_reference_locales_1: |-
13731377
-X POST 'http://localhost:7700/indexes/INDEX_NAME/search' \
13741378
-H 'Content-Type: application/json' \
13751379
--data-binary '{
1376-
"q": "進撃の巨人",
1380+
"q": "QUERY TEXT IN JAPANESE",
13771381
"locales": ["jpn"]
13781382
}'
13791383
get_localized_attribute_settings_1: |-

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

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. Use OpenAI for this tutorial.
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

reference/api/multi_search.mdx

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,82 @@ Use `federation` to receive a single list with all search results from all speci
3434
| :--------------------------------------------------------------------------- | :--------------- | :------------ | :-------------------------------------------------- |
3535
| **[`offset`](/reference/api/search#offset)** | Integer | `0` | Number of documents to skip |
3636
| **[`limit`](/reference/api/search#limit)** | Integer | `20` | Maximum number of documents returned |
37+
| **[`facetsByIndex`](#facetsbyindex)** | Object of arrays | `null` | Display facet information for the specified indexes |
38+
| **[`mergeFacets`](#mergefacets)** | Object | `null` | Display facet information for the specified indexes |
3739

3840
If `federation` is missing or `null`, Meilisearch returns a list of multiple search result objects, with each item from the list corresponding to a search query in the request.
3941

42+
##### `facetsByIndex`
43+
44+
`facetsByIndex` must be an object. Its keys must correspond to indexes in your Meilisearch project. Each key must be associated with an array of attributes in the filterable attributes list of that index:
45+
46+
```json
47+
"facetsByIndex": {
48+
"INDEX_A": ["ATTRIBUTE_X", "ATTRIBUTE_Y"],
49+
"INDEX_B": ["ATTRIBUTE_Z"]
50+
}
51+
```
52+
53+
When you specify `facetsByIndex`, multi-search responses include an extra `facetsByIndex` field. The response's `facetsByIndex` is an object with one field for each queried index:
54+
55+
```json
56+
{
57+
"hits" [ ],
58+
59+
"facetsByIndex": {
60+
"INDEX_A": {
61+
"distribution": {
62+
"ATTRIBUTE_X": {
63+
"KEY": <Integer>,
64+
"KEY": <Integer>,
65+
66+
},
67+
"ATTRIBUTE_Y": {
68+
"KEY": <Integer>,
69+
70+
}
71+
},
72+
"stats": {
73+
"KEY": {
74+
"min": <Integer>,
75+
"max": <Integer>
76+
}
77+
}
78+
},
79+
"INDEX_B": {
80+
81+
}
82+
}
83+
}
84+
```
85+
86+
##### `mergeFacets`
87+
88+
`mergeFacets` must be an object and may contain the following fields:
89+
90+
- `maxValuesPerFacet`: must be an integer. When specified, indicates the maximum number of returned values for a single facet. Defaults to the value assigned to [the `maxValuesPerFacet` index setting](/reference/api/settings#faceting)
91+
92+
When both `facetsByIndex` and `mergeFacets` are present and not null, facet information included in multi-search responses is merged across all queried indexes. Instead of `facetsByIndex`, the response includes two extra fields: `facetDistribution` and `facetStats`:
93+
94+
```json
95+
{
96+
"hits": [ ],
97+
98+
"facetFederation": {
99+
"ATTRIBUTE": {
100+
"VALUE": <Integer>,
101+
"VALUE": <Integer>
102+
}
103+
},
104+
"facetStats": {
105+
"ATTRIBUTE": {
106+
"min": <Integer>,
107+
"max": <Integer>
108+
}
109+
}
110+
}
111+
```
112+
40113
##### Merge algorithm for federated searches
41114

42115
Federated search's merged results are returned in decreasing ranking score. To obtain the final list of results, Meilisearch compares with the following procedure:

reference/api/search.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ Configures Meilisearch to return search results based on a query's meaning and c
11811181

11821182
`hybrid` must be an object. It accepts two fields: `embedder` and `semanticRatio`.
11831183

1184-
`embedder` must be a string indicating an embedder configured with the `/settings` endpoint. If you don't specify an embedder and your index contains a single embedder, Meilisearch uses it by default. If an index contains multiple embedders, Meilisearch will use the embedder named `default`.
1184+
`embedder` must be a string indicating an embedder configured with the `/settings` endpoint. It is mandatory to specify a valid embedder when performing AI-powered searches.
11851185

11861186
`semanticRatio` must be a number between `0.0` and `1.0` indicating the proportion between keyword and semantic search results. `0.0` causes Meilisearch to only return keyword results. `1.0` causes Meilisearch to only return meaning-based results. Defaults to `0.5`.
11871187

@@ -1205,6 +1205,12 @@ Use a custom vector to perform a search query. Must be an array of numbers corre
12051205

12061206
`vector` dimensions must match the dimensions of the embedder.
12071207

1208+
<Capsule intent="note">
1209+
If a query does not specify `q`, but contains both `vector` and `hybrid.semanticRatio` bigger than `0`, Meilisearch performs a pure semantic search.
1210+
1211+
If `q` is missing and `semanticRatio` is explicitly set to `0`, Meilisearch performs a placeholder search without any vector search results.
1212+
</Capsule>
1213+
12081214
#### Example
12091215

12101216
<CodeSamples id="search_parameter_guide_vector_1" />
@@ -1248,7 +1254,7 @@ Return document embedding data with search results. If `true`, Meilisearch will
12481254
### Query locales
12491255

12501256
**Parameter**: `locales`<br />
1251-
**Expected value**: array of [supported ISO-639-2B locales](/reference/api/settings#localized-attributes-object)<br />
1257+
**Expected value**: array of [supported ISO-639 locales](/reference/api/settings#localized-attributes-object)<br />
12521258
**Default value**: `[]`
12531259

12541260
By default, Meilisearch auto-detects the language of a query. Use this parameter to explicitly state the language of a query.
@@ -1275,7 +1281,6 @@ For full control over the way Meilisearch detects languages during indexing and
12751281
{
12761282
"id": 0,
12771283
"title": "DOCUMENT NAME",
1278-
"overview_cn": "OVERVIEW TEXT IN CHINESE",
12791284
"overview_jp": "OVERVIEW TEXT IN JAPANESE"
12801285
}
12811286

0 commit comments

Comments
 (0)