-
Notifications
You must be signed in to change notification settings - Fork 248
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add indexing optimization guide (#2720)
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
--- | ||
title: Indexing best practices — Meilisearch documentation | ||
description: Tips to speed up your documents indexing process. | ||
sidebarDepth: 3 | ||
--- | ||
|
||
# Indexing best practices | ||
|
||
In this guide, you will find some of the best practices to index your data efficiently and speed up the indexing process. | ||
|
||
## Define searchable attributes | ||
|
||
To speed up indexing, review your list of [searchable attributes](/learn/configuration/displayed_searchable_attributes#searchable-fields) and ensure it includes only the fields you want to be checked for query word matches. This improves both relevance and search speed by removing irrelevant data from your database. It will also keep your disk usage to the necessary minimum. | ||
|
||
### Review filterable and sortable attributes | ||
|
||
Some document fields are necessary for [filtering](/learn/fine_tuning_results/filtering) and [sorting](/learn/fine_tuning_results/sorting) results, but they dot not need to be _searchable_. Generally, **numeric and boolean fields** fall into this category. Make sure to review your list of searchable attributes and remove any fields that are only used for filtering or sorting. | ||
|
||
## Set ranking rules before indexing | ||
|
||
Whenever you update your [ranking rules](/learn/core_concepts/relevancy), Meilisearch will trigger a reindexing of all your documents. This can be a time-consuming process, especially if you have a large dataset. For this reason, it is better to define your ranking rules before indexing your data. | ||
|
||
## Optimize document size | ||
|
||
Smaller documents are processed faster, so make sure to trim down any unncessary data from your documents. When a document field is missing from the list of [searchable](/reference/api/settings#searchable-attributes), [filterable](/reference/api/settings#filterable-attributes), [sortable](/reference/api/settings#sortable-attributes), or [displayed](/reference/api/settings#displayed-attributes) attributes, it might be best to remove it from the document. To go further, consider compressing your data using methods such as `br`, `deflate`, or `gzip`. Consult the [supported encoding formats reference](/reference/api/overview#content-encoding). | ||
|
||
## Keep your Meilisearch up-to-date! | ||
|
||
Make sure to keep your Meilisearch instance up-to-date to benefit from the latest improvements. You can see [a list of all our engine releases on GitHub](https://github.com/meilisearch/meilisearch/releases?q=prerelease%3Afalse). | ||
|
||
<Capsule intent="note"> | ||
For more information on how indexing works under the hood, take a look [this blog post about indexing best practices](https://blog.meilisearch.com/best-practices-for-faster-indexing/) and the [indexing and performance guide](/learn/advanced/indexing). | ||
</Capsule> | ||
|
||
By following these recommendations, you can optimize the indexing process of Meilisearch and enhance the overall search experience for your users. |