Skip to content
Merged
Show file tree
Hide file tree
Changes from 18 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
20 changes: 18 additions & 2 deletions .code-samples.meilisearch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ get_one_document_1: |-
-X GET 'http://localhost:7700/indexes/movies/documents/25684?fields=id,title,poster,release_date'
get_documents_1: |-
curl \
-X GET 'http://localhost:7700/indexes/movies/documents?limit=2'
-X GET 'http://localhost:7700/indexes/movies/documents?limit=2&filter=genres=action'
add_or_replace_documents_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/documents' \
Expand Down Expand Up @@ -60,7 +60,7 @@ delete_all_documents_1: |-
delete_one_document_1: |-
curl \
-X DELETE 'http://localhost:7700/indexes/movies/documents/25684'
delete_documents_1: |-
delete_documents_by_batch_1: |-
curl \
-X POST 'http://localhost:7700/indexes/movies/documents/delete-batch' \
-H 'Content-Type: application/json' \
Expand Down Expand Up @@ -1065,3 +1065,19 @@ filtering_update_settings_1: |-
"genres",
"director"
]'
get_documents_post_1: |-
curl \
-X POST http://localhost:7700/indexes/books/documents/fetch \
-H 'Content-Type: application/json' \
--data-binary '{
"filter": "(rating > 3 AND (genres = Adventure OR genres = Fiction)) AND language = English",
"fields": ["title", "genres", "rating", "language"],
"limit": 3
}'
delete_documents_by_filter_1: |-
curl \
-X POST http://localhost:7700/indexes/movies/documents/delete \
-H 'Content-Type: application/json' \
--data-binary '{
"filter": "genres = action AND genres = adventure"
}'
2 changes: 1 addition & 1 deletion learn/inner_workings/known_limitations.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ user = 1 OR user = 2 […] OR user = 1500 OR user = 1501 […] OR user = 2000 OR

**Limitation:** By default, Meilisearch returns up to 1000 documents per search.

**Explanation:** Meilisearch limits the maximum amount of returned search results to protect your database from malicious scraping. You may change this by using the `maxTotalHits` property of the [pagination index settings](/reference/api/settings#pagination-object). `maxTotalHits` only applies to the [search route](/reference/api/search) and has no effect on the [get documents endpoint](/reference/api/documents#get-documents).
**Explanation:** Meilisearch limits the maximum amount of returned search results to protect your database from malicious scraping. You may change this by using the `maxTotalHits` property of the [pagination index settings](/reference/api/settings#pagination-object). `maxTotalHits` only applies to the [search route](/reference/api/search) and has no effect on the [get documents with POST](/reference/api/documents#get-documents-with-post) and [get documents with GET](/reference/api/documents#get-documents-with-get) endpoints.

## Large datasets and internal errors

Expand Down
233 changes: 193 additions & 40 deletions reference/api/documents.mdx

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions reference/api/keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,29 +72,29 @@ You can use `*` as a wildcard to access all endpoints for the `documents`, `inde
For security reasons, we do not recommend creating keys that can perform all actions.
</Capsule>

| Name | Description |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`search`** | Provides access to both [`POST`](/reference/api/search#search-in-an-index-with-post-route) and [`GET`](/reference/api/search#search-in-an-index-with-get-route) search endpoints |
| **`documents.add`** | Provides access to the [add documents](/reference/api/documents#add-or-replace-documents) and [update documents](/reference/api/documents#add-or-update-documents) endpoints |
| **`documents.get`** | Provides access to the [get one document](/reference/api/documents#get-one-document) and [get documents](/reference/api/documents#get-documents) endpoints |
| **`documents.delete`** | Provides access to the [delete one document](/reference/api/documents#delete-one-document), [delete all documents](/reference/api/documents#delete-all-documents), and [batch delete](/reference/api/documents#delete-documents-by-batch) endpoints |
| **`indexes.create`** | Provides access to the [create index](/reference/api/indexes#create-an-index) endpoint |
| **`indexes.get`** | Provides access to the [get one index](/reference/api/indexes#get-one-index) and [list all indexes](/reference/api/indexes#list-all-indexes) endpoints. **Non-authorized `indexes` will be omitted from the response** |
| **`indexes.update`** | Provides access to the [update index](/reference/api/indexes#update-an-index) endpoint |
| **`indexes.delete`** | Provides access to the [delete index](/reference/api/indexes#delete-an-index) endpoint |
| **`indexes.swap`** | Provides access to the swap indexes endpoint. **Non-authorized `indexes` will not be swapped** |
| **`tasks.get`** | Provides access to the [get one task](/reference/api/tasks#get-one-task) and [get tasks](/reference/api/tasks#get-tasks) endpoints. **Tasks from non-authorized `indexes` will be omitted from the response** |
| **`tasks.cancel`** | Provides access to the [cancel tasks](/reference/api/tasks#cancel-tasks) endpoint. **Tasks from non-authorized `indexes` will not be canceled** |
| **`tasks.delete`** | Provides access to the [delete tasks](/reference/api/tasks#delete-tasks) endpoint. **Tasks from non-authorized `indexes` will not be deleted** |
| **`settings.get`** | Provides access to the [get settings](/reference/api/settings#get-settings) endpoint and equivalents for all subroutes |
| **`settings.update`** | Provides access to the [update settings](/reference/api/settings#update-settings) and [reset settings](/reference/api/settings#reset-settings) endpoints and equivalents for all subroutes |
| **`stats.get`** | Provides access to the [get stats of an index](/reference/api/stats#get-stats-of-an-index) endpoint and the [get stats of all indexes](/reference/api/stats#get-stats-of-all-indexes) endpoint. For the latter, **non-authorized `indexes` are omitted from the response** |
| **`dumps.create`** | Provides access to the [create dump](/reference/api/dump#create-a-dump) endpoint. **Not restricted by `indexes`** |
| **`version`** | Provides access to the [get Meilisearch version](/reference/api/version#get-version-of-meilisearch) endpoint |
| **`keys.get`** | Provides access to the [get all keys](#get-all-keys) endpoint |
| **`keys.create`** | Provides access to the [create key](#create-a-key) endpoint |
| **`keys.update`** | Provides access to the [update key](#update-a-key) endpoint |
| **`keys.delete`** | Provides access to the [delete key](#delete-a-key) endpoint |
| Name | Description |
| :--------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`search`** | Provides access to both [`POST`](/reference/api/search#search-in-an-index-with-post-route) and [`GET`](/reference/api/search#search-in-an-index-with-get-route) search endpoints |
| **`documents.add`** | Provides access to the [add documents](/reference/api/documents#add-or-replace-documents) and [update documents](/reference/api/documents#add-or-update-documents) endpoints |
| **`documents.get`** | Provides access to the [get one document](/reference/api/documents#get-one-document), [get documents with POST](/reference/api/documents#get-documents-with-post), and [get documents with GET](/reference/api/documents#get-documents-with-get) endpoints endpoints |
| **`documents.delete`** | Provides access to the [delete one document](/reference/api/documents#delete-one-document), [delete all documents](/reference/api/documents#delete-all-documents), [batch delete](/reference/api/documents#delete-documents-by-batch), and [delete by filter](/reference/api/documents#delete-documents-by-filter) endpoints |
| **`indexes.create`** | Provides access to the [create index](/reference/api/indexes#create-an-index) endpoint |
| **`indexes.get`** | Provides access to the [get one index](/reference/api/indexes#get-one-index) and [list all indexes](/reference/api/indexes#list-all-indexes) endpoints. **Non-authorized `indexes` will be omitted from the response** |
| **`indexes.update`** | Provides access to the [update index](/reference/api/indexes#update-an-index) endpoint |
| **`indexes.delete`** | Provides access to the [delete index](/reference/api/indexes#delete-an-index) endpoint |
| **`indexes.swap`** | Provides access to the swap indexes endpoint. **Non-authorized `indexes` will not be swapped** |
| **`tasks.get`** | Provides access to the [get one task](/reference/api/tasks#get-one-task) and [get tasks](/reference/api/tasks#get-tasks) endpoints. **Tasks from non-authorized `indexes` will be omitted from the response** |
| **`tasks.cancel`** | Provides access to the [cancel tasks](/reference/api/tasks#cancel-tasks) endpoint. **Tasks from non-authorized `indexes` will not be canceled** |
| **`tasks.delete`** | Provides access to the [delete tasks](/reference/api/tasks#delete-tasks) endpoint. **Tasks from non-authorized `indexes` will not be deleted** |
| **`settings.get`** | Provides access to the [get settings](/reference/api/settings#get-settings) endpoint and equivalents for all subroutes |
| **`settings.update`** | Provides access to the [update settings](/reference/api/settings#update-settings) and [reset settings](/reference/api/settings#reset-settings) endpoints and equivalents for all subroutes |
| **`stats.get`** | Provides access to the [get stats of an index](/reference/api/stats#get-stats-of-an-index) endpoint and the [get stats of all indexes](/reference/api/stats#get-stats-of-all-indexes) endpoint. For the latter, **non-authorized `indexes` are omitted from the response** |
| **`dumps.create`** | Provides access to the [create dump](/reference/api/dump#create-a-dump) endpoint. **Not restricted by `indexes`** |
| **`version`** | Provides access to the [get Meilisearch version](/reference/api/version#get-version-of-meilisearch) endpoint |
| **`keys.get`** | Provides access to the [get all keys](#get-all-keys) endpoint |
| **`keys.create`** | Provides access to the [create key](#create-a-key) endpoint |
| **`keys.update`** | Provides access to the [update key](#update-a-key) endpoint |
| **`keys.delete`** | Provides access to the [delete key](#delete-a-key) endpoint |

### `indexes`

Expand Down
4 changes: 2 additions & 2 deletions reference/api/search.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Search for documents matching a specific query in the given index.
This is the preferred endpoint to perform search when an API key is required, as it allows for [preflight requests](https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request) to be cached. Caching preflight requests **considerably improves search speed**.

<Capsule intent="note">
By default, [this endpoint returns a maximum of 1000 results](/learn/advanced/known_limitations#maximum-number-of-results-per-search). If you want to scrape your database, use the [get documents endpoint](/reference/api/documents#get-documents) instead.
By default, [this endpoint returns a maximum of 1000 results](/learn/advanced/known_limitations#maximum-number-of-results-per-search). If you want to scrape your database, use the [get documents endpoint](/reference/api/documents#get-documents-with-post) instead.
</Capsule>

### Path parameters
Expand Down Expand Up @@ -136,7 +136,7 @@ This endpoint only accepts [string filter expressions](/learn/advanced/filtering
This endpoint should only be used when no API key is required. If an API key is required, use the [POST](/reference/api/search#search-in-an-index-with-post-route) route instead.

<Capsule intent="note">
By default, [this endpoint returns a maximum of 1000 results](/learn/advanced/known_limitations#maximum-number-of-results-per-search). If you want to scrape your database, use the [get documents endpoint](/reference/api/documents#get-documents) instead.
By default, [this endpoint returns a maximum of 1000 results](/learn/advanced/known_limitations#maximum-number-of-results-per-search). If you want to scrape your database, use the [get documents endpoint](/reference/api/documents#get-documents-with-post) instead.
</Capsule>

### Path parameters
Expand Down
2 changes: 1 addition & 1 deletion reference/api/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ You can use this `taskUid` to get more details on [the status of the task](/refe

## Displayed attributes

The attributes added to the `displayedAttributes` list appear in search results. `displayedAttributes` only affects the search endpoints. It has no impact on the [GET documents endpoint](/reference/api/documents#get-documents).
The attributes added to the `displayedAttributes` list appear in search results. `displayedAttributes` only affects the search endpoints. It has no impact on the [get documents with POST](/reference/api/documents#get-documents-with-post) and [get documents with GET](/reference/api/documents#get-documents-with-get) endpoints.

By default, the `displayedAttributes` array is equal to all fields in your dataset. This behavior is represented by the value `["*"]`.

Expand Down
Loading