Meilisearch v1.1 is released! 🎉

Let's take a look at some of the most significant changes in Meilisearch's latest update. We’ll go over the main changes in this article, but you can also view the full changelog on GitHub.

New feature: multi-search API endpoint

With the introduction of the /multi-search API endpoint, Meilisearch allows you to send multiple search queries using a single HTTP request. This will allow you to accomplish a number of different things, like federated search and multi-select facets!

Federated search

Suppose you have two distinct datasets: “brands” and “products”. Wouldn’t it be convenient if you could search for both at once while keeping them separate in their respective indexes? You can perform a federated search, also known as multi-index search, by querying multiple indexes:

curl \
-X POST 'http://localhost:7700/multi-search' \
-H 'Content-Type: application/json' \
--data-binary '{
  "queries": [
     {
       "indexUid": "products",
       "q": "Nike",
       "limit": 1
     },
    {
       "indexUid": "brands",
       "q": "Nike",
       "limit": 1
    }
  ]
}'

The response is a results array containing one object for each queried index:

{
 "results": [
   {
     "indexUid": "products",
     "hits": […],
     "query": "Nike",
     "processingTimeMs": 1,
     "limit": 1,
     "offset": 0,
     "estimatedTotalHits": 17
   },
   {
     "indexUid": "brands",
     "hits": […],
     "query": "Nike",
     "processingTimeMs": 0,
     "limit": 1,
     "offset": 0,
     "estimatedTotalHits": 7
   }
 ]
}

Multi-select facets

The multi-search requests API is particularly useful when it comes to implementing multi-select facets behavior in a faceted search interface.

Multi-select facets, also called disjunctive facets, allow users to view items that meet multiple criteria at the same time. This type of interface also shows the number of items available for each option, even if these items have not been selected. This allows for fast and efficient exploration of items that meet your users’ specific criteria, ultimately saving time and effort.

Since multi-select facets operate according to the inclusive OR logic, computing them requires sending several queries to Meilisearch. Sending these queries separately can lead to reduced performance and potentially higher hosting service costs.

Using the /multi-search endpoint, you can send multiple queries to the same index in a single request, thereby optimizing performance and reducing hosting costs.

Prior to v1.1, achieving disjunctive facets behavior with Instant Meilisearch was possible but required making multiple requests to the API. This workaround is no longer necessary since Instant Meilisearch now uses the /multi-search endpoint.

Check our documentation to learn more about multi-search requests and faceted search.

New feature: _geoBoundingBox

A bounding box is a rectangular box that completely encloses an area. With the new _geoBoundingBox filter expression, you can search for results contained within a rectangular geographic area.

It takes two parameters corresponding to the coordinates of the top right (northeast) and bottom left (southwest) corners of the desired area: _geoBoundingBox([lat, lng], [lat, lng])

curl \
-X POST 'http://localhost:7700/indexes/restaurants/search' \
-H 'Content-type:application/json' \
--data-binary '{ "filter": "_geoBoundingBox([45.472735, 9.184019],[45.473711, 9.185613] )" }'

Check our guide on filtering results based on geographic coordinates.

New feature: introducing facetStats

When using the facets parameter in a search query, the search results object will now include a facetStats object that provides minimum and maximum values for each numerical facet. Any facets without numerical values will be omitted.

Given an index of products, suppose that you want to know the highest and the lowest price to implement a range slider component:

curl \
 -X POST 'http://localhost:7700/indexes/products/search' \
 -H 'Content-Type: application/json' \
 --data-binary '{
 "facets": ["price"]
 }'

You would get the following response with all necessary information ready to use:

{
   "hits": […],
   "facetDistribution": {
     "price": {…}
   },
   "facetStats": {
     "price": {
       "min": 1.99,
       "max": 1898.28
     }
   }
 }

Improvement: removing limits on index size and count

Meilisearch has lifted restrictions on the number and size of indexes per instance, so you can create as many indexes as you need 🥳

The only limit now is the memory address space allocated to a single process by your operating system. Read more about this in the documentation.

Other improvements

  • You can now use wildcards (*) at the end of index names when managing API keys and tenant tokens. For example, "medical*" will match the medical_records and medical_equipement indexes

  • You can override the default CSV delimiter–a single comma (,)– using the csvDelimiter parameter of the add or update documents or add or replace documents endpoints

  • Interleaved document addition and deletion tasks are now automatically batched together, speeding up the indexing process

  • Our fantastic community has helped us enhance support for Greek and Arabic languages

  • Language detection now happens at indexing time, reducing erroneous language recognition during search and thus improving relevancy

We are really grateful for all the community members who participated in this release. We would like to thank: @akhildevelops, @AymanHamdoun, @cymruu, @FrancisMurillo @GregoryConrad, @gregsadetsky, @james-2001, @MixusMinimax, @waveywaves, and @ztkmkoo for their help with Meilisearch.

We also want to send a special shout-out to @choznerol, @cymruu, and @james-2001 for their work on Charabia.

And that’s it for v1.1! Remember to check the changelog for the full release notes. If you have any questions or would like to stay updated, you can join us on Discord or subscribe to our newsletter. You can also check out our roadmap and participate in our Product Discussions to help us improve.