Skip to content

v1.0.0 馃悵

Compare
Choose a tag to compare
@curquiza curquiza released this 06 Feb 08:21
5e12af8

馃帀 馃帀 We are proud to announce the first major release of Meilisearch! 馃帀 馃帀

This new release focuses on stabilizing the CLI instead of only introducing new features. We took this opportunity to introduce final breaking changes to the CLI and make the error handler more intuitive. There will be no breaking changes in future versions until the release of v2.0.0. Please refer to our versioning policy for a definition of what we consider to be a breaking change in Meilisearch.

Despite our focus on stabilizing Meilisearch, we also took the time to improve support for Chinese and Korean!

馃О Most integrations (SDKs, clients, libraries) will be compatible with this version within four hours of the release. Sometimes this can take up to 48 hours, depending on the issues we encounter during the release.

Here is the exhaustive list of integrations not immediately compatible with v1.0.0:

  • meilisearch-swift: though you can still use this library with v1.0.0, some new features present in Meilisearch v0.30.0 and later are not yet available. Let us know if you really need it鈥攁nd contributions are always welcome in the related repository!
  • meilisearch-java: our team is still working on refactoring the code; this is reaching the end, but the SDK cannot be used with v0.29.0 and later yet. Follow the repository to know when it will be compatible.

New features and improvements 馃敟

Improve language support

  • Add support for Korean 馃嚢馃嚪
  • Improve support for Chinese:
    • Normalize Chinese characters into Pinyin
    • Disable the HMM (Hidden Markov Model algorithm) feature in Chinese segmentation
    • Unify Chinese characters variants (kvariants, zvariants, semantic variants, etc)
  • Enhance Hebrew, Thai, Arabic, and Latin languages support by improving diacritics and non-spacing marks normalization

Done by @ManyTheFish, @dureuill, @choznerol, @crudiedo, @daniel-shuy, @harshalkhachane, @mosuka, @qbx2, @Roms1383, @Sokom141, and @yenwel in #3269 and meilisearch/milli#736 and all the Charabia's PRs listed here.

Indexing and search speed improvements

Other improvements

  • Using a single dump, you can now migrate from any old version of Meilisearch (supporting the dump feature) to the latest version. We hope to facilitate your migration to v1.0.0 to make it as smooth as possible (#3170) @dureuill
  • Improve download-latest.sh script: integrate apple-silicon binary (#3169) @curquiza
  • Clarify error message when the DB and engine versions are incompatible (#3279) @dureuill

Breaking changes 鈿狅笍

Since we are releasing v1.0.0, this is the last time we introduce breaking changes until v2.0.0.

New CLI behavior

  • As a security measure, Meilisearch will now reject master keys that are less than 16 bytes in production environment (#3274 and #3295) @dureuill
  • Remove --max-index-size and --max-task-db configuration options (#3278) @dureuill
    These options were not serving their intended purpose of limiting the disk space taken by Meilisearch for the reasons laid out here.
    Please reach out if the new limits (described in the previous link) impede your usage.
  • Remove --disable-auto-batching CLI option and the associated environment variable MEILI_DISABLE_AUTO_BATCHING (#3296) @loiclec
    This option was initially introduced as a workaround in case of a bug and is no longer useful since the feature has matured.
  • Rename dump command from --dumps-dir to --dump-dir (#3175) @dureuill
  • Remove --snapshot-interval-sec. --schedule-snapshot now accepts an optional integer value specifying the interval in seconds (#3281) @dureuill
  • The --log-level option and MEILI_LOG_LEVEL environment variable now only accept the following arguments: ERROR, WARN, INFO, DEBUG, TRACE and OFF (#3293) @loiclec
  • Remove hidden but usable CLI arguments --nb-max-chunks and --log-every-n (#3305) @Kerollmops

Revamp primary key inference

We have improved the primary key inference process when receiving documents for the first time.

If an index's primary key has not been specified, Meilisearch will attempt to infer the primary key by searching for any attributes ending with id, such as puid or _id.

If only one such attribute is detected, it will be designated as the index's primary key.

If multiple attributes ending with id are detected, Meilisearch will ask you to specify the primary key instead of choosing the first found one.

If no primary key candidates are detected, Meilisearch will throw an error as before.

Done in meilisearch/milli#752 and #3269 by @dureuill

Change the name of the binary when using apt

The command used to install the Meilisearch binary withapt is now apt install meilisearch and not apt install meilisearch-http.

To download the Meilisearch binary released before v1.0, you still need to use apt install meilisearch-http.

Error handler changes

All detailed task responses contain the error field. When a task fails, it is always accompanied by a JSON-formatted error response that contains an error code and type. Many of these codes and types were unclear and have been changed to improve the user experience.

This is a breaking change if you use any of the following codes or types in your code base:

  • When calling POST /indexes/swap-indexes, the following error codes have been updated:
    Click for details
    • duplicate_index_found is renamed to invalid_swap_duplicate_index_found
    • Sending an array of indexes not containing exactly 2 indexUids for a swap operation object now returns invalid_swap_indexes instead of a bad_request
    • If the indexes field is missing, Meilisearch now returns missing_swap_indexes instead of missing_parameter
  • When calling GET /indexes and GET /indexes/:uid, the following error codes have been updated:
    Click for details
    • Sending an invalid limit parameter now returns invalid_index_limit instead of bad_request
    • Sending an invalid offset parameter now returns invalid_index_offset instead of bad_request
  • When calling POST /indexes and PUT /indexes/:uid, the following error codes have been updated:
    Click for details
    • A missing uid in the payload will return missing_index_uid instead of bad_request
    • Sending an invalid primaryKey now returns invalid_index_primary_key instead of bad_request
  • When calling GET /index/:uid/documents and GET /indexes/:uid/documents/:uid, the following error codes have been updated:.
    Click for details
    • Sending an invalidfields parameter now returns invalid_document_fields instead of bad_request
    • Sending an invalid limit parameter now returns invalid_document_limit instead of bad_request
    • Sending an invalid offset parameter now returns invalid_document_offset instead of bad_request
    • When adding documents, trying to update the primary-key now throw an error
  • When calling POST /index/:uid/documents and PUT /indexes/:uid/documents
    Click for details
    • Sending an invalid primaryKey parameter now returns invalid_index_primary_key instead of bad_request
    • invalid_document_geo_field is renamed to invalid_geo_field
  • When calling GET /index/:uid/search and POST /indexes/:uid/search, the following error codes have been updated:
    Click for details
    • Sending an invalid q parameter now returns invalid_search_q instead of bad_request
    • Sending an invalid offset parameter now returns invalid_search_offset instead of bad_request
    • Sending an invalid limit parameter now returns invalid_search_limit instead of bad_request
    • Sending an invalid page parameter now returns invalid_search_page instead of bad_request
    • Sending an invalid hits_per_page parameter now returns invalid_search_hits_per_page instead of bad_request
    • Sending an invalidattributesToRetrieve parameter now returns invalid_search_attributes_to_retrieve instead of bad_request
    • Sending an invalidattributesToCrop parameter now returns invalid_search_attributes_to_crop instead of bad_request
    • Sending an invalid showMatchesPosition parameter now returns invalid_search_show_matches_position instead of bad_request
    • Sending an invalidfilter parameter now returns invalid_search_filter instead of invalid_filter
    • Sending an invalid sort parameter now returns invalid_search_sort instead of invalid_sort
    • Sending an invalidfacets parameter now returns invalid_search_facets instead of bad_request
    • Sending an invalidhighlightPreTag parameter now returns invalid_search_highlight_pre_tag instead of bad_request
    • Sending an invalid highlightPostTag parameter now returns invalid_search_highlight_post_tag instead of bad_request
    • Sending an invalid matchingStrategy parameter now returns invalid_search_matching_strategy instead of bad_request
  • When calling any /settings routes and their sub-routes, the following error codes have been updated:
    Click for details
    • Sending an invalid value for the displayedAttributes setting now returns invalid_settings_displayed_attributes instead of bad_request
    • Sending an invalid value for the searchableAttributes setting now returns invalid_settings_searchable_attributes instead of bad_request
    • Sending an invalid value for the filterableAttributes setting now returns invalid_settings_filterable_attributes instead of bad_request
    • Sending an invalid value for the sortableAttributes setting now returns invalid_settings_sortable_attributes instead of bad_request
    • Sending an invalid value for the rankingRules setting now returns invalid_settings_ranking_rules instead of bad_request
    • Sending an invalid value for the stopWords setting now returns invalid_settings_stop_words instead of bad_request
    • Sending an invalid value for the synonyms setting now returns invalid_settings_synonyms instead of bad_request
    • Sending an invalid value for the distinctAttribute setting now returns invalid_settings_distinct_attribute instead of bad_request
    • Sending an invalid value for the typoTolerance setting now returns invalid_settings_typo_tolerance instead of bad_request
    • invalid_settings_typo_tolerance replaces invalid_typo_tolerance_min_word_size_for_typos
    • Sending an invalid value for the faceting setting now returns invalid_settings_faceting instead of bad_request
    • Sending an invalid value for the pagination setting now returns invalid_settings_pagination instead of bad_request
  • When calling any /tasks routes, the following error codes have been updated:
    Click for details
    • Sending an invalid offset parameter now returns invalid_search_offset instead of bad_request
    • Sending an invalid limit parameter now returns invalid_search_limit instead of bad_request
    • Sending an invalid uids parameter now returns invalid_task_uids instead of invalid_task_uids_filter
    • Sending an invalid types parameter now returns invalid_task_types instead of invalid_task_types_filter
    • Sending an invalid statuses parameter now returns invalid_task_statuses instead of invalid_task_statuses_filter
    • Sending an invalid cancelBy parameter now returns invalid_task_cancel_by instead of invalid_task_canceled_by_filter
    • Sending an invalid beforeEnqueuedAt parameter now returns invalid_task_before_enqueued_at instead of invalid_task_date_filter
    • Sending an invalid afterEnqueuedAt parameter now returns invalid_task_after_enqueued_at instead of invalid_task_date_filter
    • Sending an invalid beforeStartedAt parameter now returns invalid_task_before_started_at instead of invalid_task_date_filter
    • Sending an invalid afterStartedAt parameter now returns invalid_task_after_started_at instead of invalid_task_date_filter
    • Sending an invalid beforeFinishedAt parameter now returns invalid_task_before_finished_at instead of invalid_task_date_filter
    • Sending an invalid afterFinishedAt parameter now returns invalid_task_after_finished_at instead of invalid_task_date_filter
  • When calling GET /keys and GET /keys/:uid, the following error codes have been updated:
    Click for details
    • Sending an invalid limit parameter now returns invalid_api_key_limit instead of bad_request
    • Sending an invalid offset parameter now returns invalid_api_key_offset instead of bad_request
  • When calling POST /keys, the following error codes have been updated:
    Click for details
    • If the actions field is missing, Meilisearch now returns missing_api_key_actions instead of missing_parameter
    • If the indexes field is missing, Meilisearch now returns missing_api_key_indexes instead of missing_parameter
    • If the expiresAt field is missing, Meilisearch now returns missing_api_key_expire_at instead of missing_parameter
  • When calling PATCH /keys, the following error codes have been updated:
    Click for details
    • Updating the uid field now returns immutable_api_key_uid instead of immutable_field
    • Updating the actions field now returns immutable_api_key_actions instead of immutable_field
    • Updating the indexes field now returns immutable_api_key_indexes instead of immutable_field
    • Updating the expiresAt field now returns immutable_api_key_expires_at instead of immutable_field
    • Updating the createdAt field now returns immutable_api_key_created_at instead of immutable_field
    • Updating the updatedAt field now returns immutable_api_key_updated_at instead of immutable_field
  • When Meilisearch does not have enough space
    • the no_space_left_on_device code replaces internal
    • system type replaces internal
  • When Meilisearch throws an I/O error
    • the io_error code replaces internal
    • system type replaces internal
  • When your machines exceeds the maximum number allowed for open files, Meilisearch returns
    • the too_many_open_files code instead of internal
    • system type instead of internal
  • All Meilisearch errors of type system return the HTTP error code 500 (#3321) @irevoire
  • The following errors are now returned synchronously:
    • invalid_index_uid
    • invalid_settings_ranking_rules
    • invalid_settings_typo_tolerance if oneTypo and twoTypos are filled (for minWordSizeForTypos) but are invalid

Done by @irevoire and @loiclec in #3316, #3263, #3329, #3334, #3412 and #3339

Fixes 馃悶

Misc

The following changes do not impact user experience.

鉂わ笍 Thanks again to our external contributors: