Skip to content

v0.29 #1859

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 62 commits into from
Oct 3, 2022
Merged

v0.29 #1859

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
97acfdb
v0.29: version bump
guimachiavelli Sep 5, 2022
03bf974
update Docker tag
maryamsulemani97 Sep 6, 2022
885c2c8
Thai support
maryamsulemani97 Sep 6, 2022
70c2a53
v0.29: Telemetry
maryamsulemani97 Sep 6, 2022
301bf65
v0.29: update keys
maryamsulemani97 Sep 6, 2022
ecdcd38
update keys.md
maryamsulemani97 Sep 6, 2022
c2bdeba
update for auto-batching
maryamsulemani97 Sep 6, 2022
2dbd09b
remove experimental, update instance options+quick start
maryamsulemani97 Sep 6, 2022
f5cce61
update config.js+indexing.md
maryamsulemani97 Sep 6, 2022
6703f3e
Merge branch 'master' into v0.29
guimachiavelli Sep 6, 2022
ce8f24e
update documents.md
maryamsulemani97 Sep 6, 2022
1da54a3
update tables
maryamsulemani97 Sep 6, 2022
648077c
storage: add information about soft deletion
guimachiavelli Sep 6, 2022
13b877f
update based on review
maryamsulemani97 Sep 6, 2022
e8fc94b
Update reference/api/keys.md
maryamsulemani97 Sep 6, 2022
3019900
update `invalid_geo_field` error description
guimachiavelli Sep 6, 2022
610b287
minor updates
maryamsulemani97 Sep 7, 2022
7c44c92
Update learn/advanced/indexing.md
maryamsulemani97 Sep 7, 2022
2dcf312
update search.md
maryamsulemani97 Sep 7, 2022
470e255
Update reference/api/search.md
maryamsulemani97 Sep 7, 2022
789af6d
Update reference/api/search.md
maryamsulemani97 Sep 7, 2022
c1cabab
filters: add new operators, update existing behaviour with v0.29 fixes
guimachiavelli Sep 7, 2022
49cb23c
filters: update with v0.29 changes
guimachiavelli Sep 7, 2022
32badbb
Update postman collection for v0.29.0
curquiza Sep 6, 2022
b48698e
update based on review
maryamsulemani97 Sep 8, 2022
91b9f9f
update based on review
maryamsulemani97 Sep 8, 2022
eb57a7f
filters: polish wording
guimachiavelli Sep 8, 2022
df6d88e
filters: improve filter expression example
guimachiavelli Sep 8, 2022
ec8780e
Apply suggestions from code review
guimachiavelli Sep 8, 2022
0570801
Fix the Austen typo
curquiza Sep 13, 2022
97839e9
add redirect
maryamsulemani97 Sep 15, 2022
0af5eac
Update learn/core_concepts/documents.md
maryamsulemani97 Sep 15, 2022
1b861df
Apply suggestions from code review
maryamsulemani97 Sep 15, 2022
d34ac95
update based on review
maryamsulemani97 Sep 15, 2022
378881b
filter: address SME feedback
guimachiavelli Sep 15, 2022
cdd01fd
update based on feedback
maryamsulemani97 Sep 15, 2022
4ec39ff
Update learn/core_concepts/documents.md
maryamsulemani97 Sep 19, 2022
d3d0218
Update learn/core_concepts/documents.md
maryamsulemani97 Sep 19, 2022
865e016
blank line
maryamsulemani97 Sep 19, 2022
1613451
soft deletion: improve wording
guimachiavelli Sep 19, 2022
81f18af
Update reference/api/search.md
maryamsulemani97 Sep 20, 2022
20fb282
update based on review
maryamsulemani97 Sep 20, 2022
c537f80
soft deletion: clarify last sentence on storage.md
guimachiavelli Sep 22, 2022
a9b3d4e
Update learn/advanced/storage.md
guimachiavelli Sep 26, 2022
bba6605
Update reference/api/search.md
guimachiavelli Sep 26, 2022
818abb0
filter expressions: clarify new `NOT` behaviour
guimachiavelli Sep 27, 2022
1648faa
Apply suggestions from code review
maryamsulemani97 Sep 27, 2022
4e9b8dc
remove space
maryamsulemani97 Sep 27, 2022
c944ae2
storage: styling tweak
guimachiavelli Sep 27, 2022
124de9d
Merge branch 'master' into v0.29
guimachiavelli Sep 29, 2022
ca37caf
Merge #1860
bors[bot] Sep 29, 2022
7f46c48
Merge #1861
bors[bot] Sep 29, 2022
d82ffc0
Merge #1862
bors[bot] Sep 29, 2022
b7817d3
Merge #1863
bors[bot] Sep 29, 2022
4a20895
Merge #1864
bors[bot] Sep 29, 2022
c5549fc
Merge #1866
bors[bot] Sep 29, 2022
20f15d8
Merge #1867
bors[bot] Sep 29, 2022
5416f0d
Merge #1868
bors[bot] Sep 29, 2022
83ebdfb
Merge #1869
bors[bot] Sep 29, 2022
b31f9df
Merge branch 'v0.29' into v0.29--Add-new-search-parameter-matchingStr…
maryamsulemani97 Sep 29, 2022
5b137da
Merge #1865
bors[bot] Sep 29, 2022
c434cd4
Apply suggestions from code review
guimachiavelli Oct 3, 2022
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
16 changes: 16 additions & 0 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -986,3 +986,19 @@ getting_started_pagination: |-
--data-binary '{
"maxTotalHits": 500
}'
search_parameter_guide_matching_strategy_1: |
curl \
-X POST 'http://localhost:7700/indexes/movies/search' \
-H 'Content-Type: application/json' \
--data-binary '{
"q": "big fat liar",
"matchingStrategy": "last"
}'
search_parameter_guide_matching_strategy_2: |
curl \
-X POST 'http://localhost:7700/indexes/movies/search' \
-H 'Content-Type: application/json' \
--data-binary '{
"q": "big fat liar",
"matchingStrategy": "all"
}'
17 changes: 1 addition & 16 deletions .vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const ogprefix = 'og: http://ogp.me/ns#'
module.exports = {
title: 'Meilisearch Documentation v0.28',
title: 'Meilisearch Documentation v0.29',
description: 'Open source Instant Search Engine',
theme: 'default-prefers-color-scheme',
themeConfig: {
Expand Down Expand Up @@ -271,21 +271,6 @@ module.exports = {
},
],
},
{
title: '🧪 Experimental',
collapsable: false,
path: '/learn/experimental/overview.html',
children: [
{
title: 'Overview',
path: '/learn/experimental/overview',
},
{
title: 'Auto-batching',
path: '/learn/experimental/auto-batching',
},
],
},
{
title: '👐 Contributing',
path: '/learn/contributing/overview.html',
Expand Down
3 changes: 3 additions & 0 deletions .vuepress/public/_redirects
Original file line number Diff line number Diff line change
Expand Up @@ -196,3 +196,6 @@

# Rename indexation to indexing
/learn/advanced/indexation.html /learn/advanced/indexing.html

# Remove autobatching
/learn/experimental/auto-batching.html /learn/core_concepts/documents.html
11 changes: 8 additions & 3 deletions .vuepress/public/postman/meilisearch-collection.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"info": {
"_postman_id": "453f3754-4b37-4654-8fe3-b2b3aef24048",
"name": "Meilisearch v0.28",
"_postman_id": "5ad97bb3-840b-40dc-9012-482a0c2c52a5",
"name": "Meilisearch v0.29",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "8898306"
},
Expand Down Expand Up @@ -79,7 +79,7 @@
"header": [],
"body": {
"mode": "raw",
"raw": "[\n { \"id\": 2, \"title\": \"Pride and Prejudice\", \"author\": \"Jane Austin\", \"genre\": \"romance\", \"price\": 3.5 },\n { \"id\": 456, \"title\": \"Le Petit Prince\", \"author\": \"Antoine de Saint-Exupéry\", \"genre\": \"adventure\" , \"price\": 10.0 },\n { \"id\": 1, \"title\": \"Alice In Wonderland\", \"author\": \"Lewis Carroll\", \"genre\": \"fantasy\", \"price\": 25.99 },\n { \"id\": 1344, \"title\": \"The Hobbit\", \"author\": \"J. R. R. Tolkien\", \"genre\": \"fantasy\" },\n { \"id\": 4, \"title\": \"Harry Potter and the Half-Blood Prince\", \"author\": \"J. K. Rowling\", \"genre\": \"fantasy\" },\n { \"id\": 42, \"title\": \"The Hitchhiker's Guide to the Galaxy\", \"author\": \"Douglas Adams\" }\n]",
"raw": "[\n { \"id\": 2, \"title\": \"Pride and Prejudice\", \"author\": \"Jane Austen\", \"genre\": \"romance\", \"price\": 3.5 },\n { \"id\": 456, \"title\": \"Le Petit Prince\", \"author\": \"Antoine de Saint-Exupéry\", \"genre\": \"adventure\" , \"price\": 10.0 },\n { \"id\": 1, \"title\": \"Alice In Wonderland\", \"author\": \"Lewis Carroll\", \"genre\": \"fantasy\", \"price\": 25.99 },\n { \"id\": 1344, \"title\": \"The Hobbit\", \"author\": \"J. R. R. Tolkien\", \"genre\": \"fantasy\" },\n { \"id\": 4, \"title\": \"Harry Potter and the Half-Blood Prince\", \"author\": \"J. K. Rowling\", \"genre\": \"fantasy\" },\n { \"id\": 42, \"title\": \"The Hitchhiker's Guide to the Galaxy\", \"author\": \"Douglas Adams\" }\n]",
"options": {
"raw": {
"language": "json"
Expand Down Expand Up @@ -309,6 +309,11 @@
"key": "highlightPostTag",
"value": "</mark>",
"disabled": true
},
{
"key": "matchingStrategy",
"value": "all",
"disabled": true
}
]
}
Expand Down
2 changes: 2 additions & 0 deletions .vuepress/public/sample-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,3 +152,5 @@ synonyms_guide_1: |-
getting_started_faceting: |-
getting_started_pagination: |-
getting_started_front_end_integration_md: |-
search_parameter_guide_matching_strategy_1: |-
search_parameter_guide_matching_strategy_2: |-
12 changes: 11 additions & 1 deletion learn/advanced/filtering_and_faceted_search.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,14 @@ The [`GET` route of the search endpoint](/reference/api/search.md#search-in-an-i

String expressions combine conditions using the following filter operators and parentheses:

- `NOT` only returns documents that do not satisfy a condition : `NOT genres = horror`
- `NOT` returns all documents that do not satisfy a condition. The expression `NOT genres = horror` returns all documents whose `genres` do not contain `horror` and all documents missing a `genres` field
- `AND` operates by connecting two conditions and only returns documents that satisfy both of them: `genres = horror AND director = 'Jordan Peele'`
- `OR` connects two conditions and returns results that satisfy at least one of them: `genres = horror OR genres = comedy`
- `TO` is equivalent to `>= AND <=`. The expression `release_date 795484800 TO 972129600` translates to `release_date >= 795484800 AND release_date <= 972129600`
- `IN [valueA, valueB, …, valueN]` selects all documents whose chosen field contains at least one of the specified values. The expression `genres IN [horror, comedy]` returns all documents whose `genres` includes either `horror`, `comedy`, or both
- `EXISTS` checks for the existence of a field. Fields with empty or null values still count as existing. The expression `release_date NOT EXISTS` returns all documents without a `release_date`

When creating an expression with a field name or value identical to a filter operator such as `AND` or `NOT`, you must wrap it in quotation marks: `title = "NOT" OR title = "AND"`.

::: tip
String expressions are read left to right. `NOT` takes precedence over `AND` and `AND` takes precedence over `OR`. You can use parentheses to ensure expressions are correctly parsed.
Expand Down Expand Up @@ -220,6 +224,12 @@ You can use this filter when searching for `Planet of the Apes`:

<CodeSamples id="filtering_guide_3" />

`NOT director = "Tim Burton"` will include both documents that do not contain `"Tim Burton"` in its `director` field and documents without a `director` field. To return only documents that have a `director` field, expand the filter expression with the `EXISTS` operator:

```SQL
rating >= 3 AND (NOT director = "Tim Burton" AND director EXISTS)
```

## Filtering with `_geoRadius`

If your documents contain `_geo` data, you can use the `_geoRadius` built-in filter rule to filter results according to their geographic position.
Expand Down
6 changes: 2 additions & 4 deletions learn/advanced/indexing.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,14 @@ Multi-threading is unfortunately not possible in machines with only one processo

## Improving indexing performance

If you encounter performance issues during the indexing we recommend trying the following points:
If you encounter performance issues during indexing, we recommend trying the following:

- Make sure you are using the latest [stable version of Meilisearch](https://github.com/meilisearch/meilisearch/releases). New releases often include performance improvements that can significantly increase indexing speed.

- indexing is a memory-intensive and multi-threaded operation. This means **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.
- Indexing is a memory-intensive and multi-threaded operation. This means **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.

- **Bigger HTTP payloads are processed more quickly than smaller payloads**. For example, adding the same 100,000 documents in two batches of 50,000 documents will be quicker than adding them in four batches of 25,000 documents. By default, Meilisearch sets the maximum payload size to 100MB, but [you can change this value if necessary](/learn/configuration/instance_options.md#payload-limit-size). That said, **the bigger the payload is, the higher the memory consumption will be**. An instance may crash if it requires more RAM than is currently available in a machine.

- If you want to speed up indexing but don't wish to batch documents manually, consider giving our [experimental auto-batcher](/learn/experimental/auto-batching.md) a try.

- **Meilisearch should not be your main database**. The more documents you add, the longer will indexing and search take, so you should only index documents you want to retrieve when searching.

- By default, all document fields are searchable. We strongly recommend changing this by [updating the `searchableAttributes` list](/reference/api/settings.md#update-searchable-attributes) so it only contains fields you want to search in. The fewer fields Meilisearch needs to index, the faster is the indexing process.
Expand Down
6 changes: 6 additions & 0 deletions learn/advanced/storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,3 +71,9 @@ These metrics are highly dependent on the machine that is running Meilisearch. R
It is important to note that **there is no reliable way to predict the final size of a database**. This is true for just about any search engine on the market—we're just the only ones saying it out loud.

Database size is affected by a large number of criteria, including settings, relevancy rules, use of facets, the number of different languages present, and more.

## Soft deletion

Meilisearch renders deleted documents inaccessible to all users but does not immediately remove them from the database. This is a common optimization technique called soft deletion. Soft deleted documents are permanently deleted during a later update, depending on your index size and the available disk space. It might be important to check how soft deletion interacts with data retention legislation relevant to your application.

Soft deletion also affects document updates: when you update a document, Meilisearch removes the current record and creates a new document with updated data.
1 change: 1 addition & 0 deletions learn/advanced/tokenization.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ Pipelines include many language-specific operations. Currently, we have four pip
2. A specialized Chinese pipeline using [Jieba](https://github.com/messense/jieba-rs)
3. A specialized Japanese pipeline using [Lindera](https://github.com/lindera-morphology/lindera)
4. A specialized Hebrew pipeline based off the default Meilisearch pipeline. Uses [Niqqud](https://docs.rs/niqqud/latest/niqqud/) for normalization
5. A specialized Thai pipeline using [dictionary-based](https://github.com/PyThaiNLP/nlpo3) segmentation

For more details, check out the [tokenizer contribution guide](https://github.com/meilisearch/charabia/blob/main/CONTRIBUTING.md).
13 changes: 13 additions & 0 deletions learn/configuration/instance_options.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,19 @@ If no master key is provided in a `development` environment, all routes will be

[Learn more about Meilisearch's use of security keys.](/learn/security/master_api_keys.md)

### Disable auto-batching

::: warning
🚩 This is a CLI flag and does not take any values. Assigning a value will throw an error. 🚩
:::

**Environment variable**: `MEILI_DISABLE_AUTO_BATCHING`
**CLI option**: `--disable-auto-batching`

Deactivates auto-batching when provided.

[Learn more about auto-batching.](/learn/core_concepts/documents.md#auto-batching)

### Disable analytics

::: warning
Expand Down
16 changes: 16 additions & 0 deletions learn/core_concepts/documents.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,19 @@ Since CSV does not support arrays or nested objects, `cast` cannot be converted
::: note
If you don't specify the data type for an attribute, it will default to `:string`.
:::

### Auto-batching

Auto-batching combines consecutive document addition requests into a single batch and processes them together. This significantly speeds up the indexing process.

Meilisearch batches document addition requests when they:

- Target the same index
- Have the same update method (i.e., [POST](/reference/api/documents.md#add-or-replace-documents) or [PUT](/reference/api/documents.md#add-or-update-documents))
- Are immediately consecutive

Tasks within the same batch share the same values for `startedAt`, `finishedAt`, and `duration`.

If a task fails due to an invalid document, it will be removed from the batch. The rest of the batch will still process normally. If an [`internal`](/reference/api/overview.md#errors) error occurs, the whole batch will fail and all tasks within it will share the same `error` object.

You can deactivate auto-batching using the `--disable-auto-batching` command-line flag or the `MEILI_DISABLE_AUTO_BATCHING` environment variable. This is useful in cases where you want to avoid any potential bugs in the feature or reduce visibility latency. When auto-batching is disabled, the whole queue takes longer to process, but each individual task will be processed earlier (until a certain number of processed tasks).
54 changes: 0 additions & 54 deletions learn/experimental/auto-batching.md

This file was deleted.

15 changes: 0 additions & 15 deletions learn/experimental/overview.md

This file was deleted.

6 changes: 4 additions & 2 deletions learn/getting_started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ These commands launch the **latest stable release** of Meilisearch.

```bash
# Fetch the latest version of Meilisearch image from DockerHub
docker pull getmeili/meilisearch:v0.28
docker pull getmeili/meilisearch:v0.29

# Launch Meilisearch in development mode with a master key
docker run -it --rm \
Expand Down Expand Up @@ -181,7 +181,9 @@ Meilisearch stores data in the form of discrete records, called [documents](/lea
Meilisearch currently only accepts data in JSON, NDJSON, and CSV formats. You can read more about this in our [documents guide](/learn/core_concepts/documents.md#dataset-format).
:::

The previous command added documents from `movies.json` to a new index called `movies`. After adding documents, you should receive a response like this:
The previous command added documents from `movies.json` to a new index called `movies`.

By default, Meilisearch combines consecutive document requests into a single batch and processes them together. This process is called [auto-batching](/learn/core_concepts/documents.md#auto-batching), and it significantly speeds up indexing. After adding documents, you should receive a response like this:

```json
{
Expand Down
2 changes: 2 additions & 0 deletions learn/what_is_meilisearch/language.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Meilisearch is multilingual, featuring optimized support for:
- Chinese
- Japanese
- Hebrew
- Thai

We aim to provide global language support, and your feedback helps us move closer to that goal. If you notice inconsistencies in your search results or the way your documents are processed, please [open an issue in the Meilisearch repository](https://github.com/meilisearch/meilisearch/issues/new/choose).

Expand All @@ -29,6 +30,7 @@ Under the hood, Meilisearch relies on tokenizers that identify the most importan
- A pipeline specifically tailored for Chinese
- A pipeline specifically tailored for Japanese
- A pipeline specifically tailored for Hebrew
- A pipeline specifically tailored for Thai

### My language does not use whitespace to separate words. Can I still use Meilisearch?

Expand Down
2 changes: 1 addition & 1 deletion learn/what_is_meilisearch/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ _Meilisearch helps the Rust community find crates on [crates.meilisearch.com](ht
- **Blazing fast** (answers < 50 milliseconds): Priority is given to fast answers for a smooth search experience.
- [Search as you type](/learn/what_is_meilisearch/features.md#search-as-you-type): Results are updated on each keystroke. To make this possible, we use [prefix-search](/learn/advanced/prefix.md#prefix-search).
- [Typo tolerance](/learn/what_is_meilisearch/features.md#typo-tolerant): Understands typos and misspellings.
- [Tokenization](/learn/advanced/tokenization.md) in **English**, **Chinese**, and **all languages that uses space as a word divider**.
- [Tokenization](/learn/advanced/tokenization.md) in **English**, **Chinese**, and **all languages that use space as a word divider**.
- **Return the whole document**: The entire document is returned upon search.
- **Highly customizable search and indexing**:
- [Custom ranking](/learn/core_concepts/relevancy.md): Customize the relevancy of the search engine and the ranking of the search results.
Expand Down
Loading