AI-powered hybrid search is in closed beta. Join the waitlist for early access!

Go to homeMeilisearch's logo
Back to articles
12 Oct 2021

What's new in v0.23

Take a look at some of the biggest changes in MeiliSearch v0.23

Maryam Sulemani
Maryam SulemaniTechnical Writer @ Meilisearch
What's new in v0.23

This month’s release brings you geosearch and support for CSV and NDJSON payloads! You can read the full changelog, but let's take a look at some of the main and breaking changes.

New feature: Geosearch

Meilisearch v0.23 supports geosearch. This allows you to filter and sort results based on their location.

To start using this feature, the _geo field must be present in your indexed documents and added to either the filterableAttributes or sortableAttributes list, depending on the type of operation you’d like to perform.

To filter your results so that they are within a certain area, you can use the built-in _geoRadius filter rule. Let’s say we're in the center of Muscat and want to view restaurants that are within two kilometers:

curl  
    -X POST 'http://localhost:7700/indexes/restaurants/search' 
    --data-binary '{ 
		"filter": "_geoRadius(23.5880, 58.3829, 2000)" 
	}'

_geoRadius establishes a circular area based on a central point and a radius. It requires three parameters: lat, lng, and distance_in_meters—the latitude, longitude, and distance in meters respectively.

You can also sort search results in ascending or descending order based on their distance from a geographic location using _geoPoint. Let’s say you want to order documents based on how close they are to the Eiffel Tower:

curl 
    -X POST 'http://localhost:7700/indexes/restaurants/search' 
	-H 'Content-type:application/json'
	--data-binary '{
	  "sort": "_geoPoint(48.8583701,2.2922926):asc" 
	}`

The search response will return an extra field called _geoDistance. This is the distance in meters computed from the _geoPoint and the _geo coordinates of the search results.

New feature: support for NDJSON and CSV payloads

Meilisearch now accepts CSV and NDJSON along with JSON as data sources. You will now need to specify a Content-Type header for HTTP requests through tools like curl.

Both CSV and NDJSON offer better indexation performance, consume less RAM and are not as CPU-intensive as JSON. NDJSON is easier to validate and, unlike CSV, can handle nested structures.  

Breaking change: Content-Type headers are now mandatory

Since Meilisearch now supports JSON, NDJSON, and CSV, you need to specify content headers for HTTP requests through tools like curl.

  • Content-Type: application/json for JSON
  • Content-Type: application/x-ndjson for NDJSON
  • Content-Type: text/csv for CSV

An example of the JSON header when creating an index:

curl 
    -X POST 'http://localhost:7700/indexes' 
    -H 'Content-Type: application/json' 
    --data-binary '{
      "uid": "movies",
      "primaryKey": "movie_id"
    }'

Contributors

A big thank you to all our contributors! We wouldn't have made it here without your support. This month, we want to send a special shout out to @anirudhRowjee, @felixonmars, @happysalada, @kappa-wingman, @k-nasa, and @shekhirin.


And that's all folks! Remember to check out the changelog for the full release notes and see you next month!

Meilisearch Q4 2024 release wrap-up

Meilisearch Q4 2024 release wrap-up

Meilisearch Q4 release includes faster search, more control over settings in UI and a new region.

Maya Shin
Maya Shin27 Nov 2024
Meilisearch 1.11

Meilisearch 1.11

Meilisearch 1.11 advances AI-powered search toward stabilization with key improvements, including binary quantization. This release also enhances federated search functionality based on user feedback.

Meilisearch 1.10

Meilisearch 1.10

Meilisearch 1.10 introduces federated search and locale settings, and paves the way for AI-powered search stabilization.

Laurent Cazanove
Laurent Cazanove27 Aug 2024