Define searchable attributes
Review your list of searchable attributes and ensure it includes only the fields you want to be checked for query word matches. This improves both relevancy and search speed by removing irrelevant data from your database. It will also keep your disk usage to the necessary minimum. By default, all document fields are searchable. The fewer fields Meilisearch needs to index, the faster the indexing process.Review filterable and sortable attributes
Some document fields are necessary for filtering and sorting results, but they do 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.Configure your index before adding documents
When creating a new index, first configure its settings and only then add your documents. Whenever you update settings such as ranking rules, 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 ranking rules and other settings before indexing your data.Optimize document size
Smaller documents are processed faster, so make sure to trim down any unnecessary data from your documents. When a document field is missing from the list of searchable, filterable, sortable, or displayed attributes, it might be best to remove it from the document. To go further, consider compressing your data using methods such asbr, deflate, or gzip. Consult the supported encoding formats reference.
Prefer bigger HTTP payloads
A single large HTTP payload is processed more quickly than multiple 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.Keep 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.For more information on how indexing works under the hood, take a look this blog post about indexing best practices.