Skip to content

Releases: meilisearch/meilisearch-js

v0.27.0-optional-words-beta.0 🌻

01 Aug 14:50
Compare
Choose a tag to compare
Pre-release

This version makes this package compatible with Meilisearch v0.29.0-optional-words.beta.1 πŸŽ‰

In this version, you can try out the new optionalWords search parameter we are testing out. For complete information on the feature, please refer to this guide.

πŸš€ Enhancements

  • Feature prototype: define strategy on optional words during search #1312

Usage

const response = await client.index('myIndex').search('hello world', { optionalWords: 'none' })

optionalWords can be either last (default behavior) or none. More information here

Thanks again to @bidoubiwa ! πŸŽ‰

v0.28.0-pagination-beta.0 🌻

26 Jul 09:49
Compare
Choose a tag to compare
Pre-release

This version makes this package compatible with Meilisearch v0.29.0-pagination.beta.1 πŸŽ‰

In this version, you can try out the new pagination system that we are testing out. For complete information on the feature, please refer to this guide.

πŸ’₯ Breaking changes

  • index.search() the following parameters are added:
    • hitsPerPage
    • page
  • index.search() search response has new fields
    • hitsPerPage
    • page
    • totalPages
    • totalHits
  • index.search() some search response fields that are now optional (not always in the response)
    • all of the above
    • offset
    • limit
    • estimatedTotalHits

Usage

The following will provide the six hits of the first page.

index.search('', {
   hitsPerPage: 6,
   page: 1
})

The following will provide the six hits of the second page.

index.search('', {
   hitsPerPage: 6,
   page: 2
})

v0.27.0 🌻

11 Jul 15:40
bf97aea
Compare
Choose a tag to compare

This version makes this package compatible with Meilisearch v0.28.0 πŸŽ‰
Check out the changelog of Meilisearch v0.28.0 for more information on the changes.

πŸ’₯ Breaking changes

  • client.updateKey(key: string, options: KeyPayload): Promise<Key> now can just update the description and/or the name. #1266
  • The type EnqueuedTask now returns an taskUid instead of an uid
  • client.getTasks(...) and index.getTasks() now returns a TasksResults type containing the following fields: results, limit, from, next #1269
  • index.search changes in the response parameters: #1263
    • nbHits replaced with estimatedTotalHits
    • exhaustiveNbHits is deleted
    • exhaustiveFacetsCount is deleted
  • index.search changes in the request parameters: #1263
    • matches renamed showMatchesPosition
    • _matchesInfo response parameter is renamed _matchesPosition
    • facetsDistribution request parameter is renamed facets.
    • facetsDistribution response parameter is renamed facetDistribution.
  • The Index type and returned IndexObject does not contain a name field anymore
  • client.getIndexes and client.getRawIndexes now returns an IndexesResults type containing the following fields: results, limit, offset, total #1269
  • index.getDocuments and client.getDocuments now returns an DocumentsResults type containing the following fields: results, limit, offset, total #1269
  • index.getDocuments and index.getDocument query parameter attributesToRetrieve is now called fields #1264
  • client.getDumpStatus has been removed #1267
  • client.createDump() now returns an EnqueuedTask #1267
  • client.generateTenantToken(apiKeyUid, searchRules, options) has now a mandatory apiKeyUid parameter which should contain the uid of a specific API key. #1268

πŸš€ Enhancements

  • client.getKeys(parameters: KeysQuery = {}) now accepts pagination parameters: limit, offset #1269
  • client.getKey(keyOrUid: string) can now also find keys based on their key uid. #1266
  • client.createKey(options: KeyCreation) lets you specify a custom uid (optionally) to create a new Key #1269
  • The returned Key now has an additional name and uid string fields. #1266
  • The indexUid field in both EnqueuedTask and Task can be null #1259
  • client.getTasks(parameters: TasksQuery = {}) and index.getTasks(parameters: TasksQuery) now accepts pagination parameters: limit, from, next and filters parameters: type, status, indexUid (same for index.getTasks) #1269
  • client.getIndexes and client.getRawIndexes now accepts pagination parameters: limit, offset #1269
  • index.getDocuments now accepts pagination parameters: limit, offset #1269
  • new MeiliSearch({ host, apiKey, headers, clientAgents }) now accept a new parameter clientAgents that should contain the agent from which the library is used. #1272

Analytics is enabled by default in the server, but you can disable them by following this guide
Also, of course, every analytics data we collect are ANONYMOUS read the guide for more information.

Thanks again to @bidoubiwa ! πŸŽ‰

v0.27.0-beta.1

29 Jun 09:29
Compare
Choose a tag to compare
v0.27.0-beta.1 Pre-release
Pre-release

This version makes this package compatible with Meilisearch v0.28.0rc1 πŸŽ‰
Check out the changelog of Meilisearch v0.28.0rc1 for more information on the changes.

πŸ’₯ Breaking changes

  • client.updateKey(key: string, options: KeyPayload): Promise<Key> now can just update the description and/or the name. #1266
  • The type EnqueuedTask now returns an taskUid instead of an uid
  • client.getTasks(...) and index.getTasks() now returns a TasksResults type containing the following fields: results, limit, from, next #1269
  • index.search changes in the response parameters: #1263
    • nbHits replaced with estimatedTotalHits
    • exhaustiveNbHits is deleted
    • exhaustiveFacetsCount is deleted
  • index.search changes in the request parameters: #1263
    • matches renamed showMatchesPosition
    • _matchesInfo response parameter is renamed _matchesPosition
    • facetsDistribution request parameter is renamed facets.
    • facetsDistribution response parameter is renamed facetDistribution.
  • The Index type and returned IndexObject does not contain a name field anymore
  • client.getIndexes and client.getRawIndexes now returns an IndexesResults type containing the following fields: results, limit, offset, total #1269
  • index.getDocuments and client.getDocuments now returns an DocumentsResults type containing the following fields: results, limit, offset, total #1269
  • index.getDocuments query parameter attributesToRetrieve is now called fields #1264
  • client.getDumpStatus has been removed #1267
  • client.createDump() now returns an EnqueuedTask #1267
  • client.generateTenantToken(apiKeyUid, searchRules, options) has now a mandatory apiKeyUid parameter which should contain the uid of a specific API key. #1268

πŸš€ Enhancements

  • client.getKeys(parameters: KeysQuery = {}) now accepts pagination parameters: limit, offset #1269
  • client.getKey(keyOrUid: string) can now also find keys based on their key uid. #1266
  • client.createKey(options: KeyCreation) lets you specify a custom uid (optionally) to create a new Key #1269
  • The returned Key now has an additional name and uid string fields. #1266
  • The indexUid field in both EnqueuedTask and Task can be null #1259
  • client.getTasks(parameters: TasksQuery = {}) and index.getTasks(parameters: TasksQuery) now accepts pagination parameters: limit, from, next and filters parameters: type, status, indexUid (same for index.getTasks) #1269
  • client.getIndexes and client.getRawIndexes now accepts pagination parameters: limit, offset #1269
  • index.getDocuments now accepts pagination parameters: limit, offset #1269
  • new MeiliSearch({ host, apiKey, headers, clientAgents }) now accept a new parameter clientAgents that should contain the agent from which the library is used. #1272

Thanks again to @bidoubiwa ! πŸŽ‰

v0.27.0-beta.0

29 Jun 09:24
Compare
Choose a tag to compare
v0.27.0-beta.0 Pre-release
Pre-release

This version makes this package compatible with Meilisearch v0.28.0rc1 πŸŽ‰
Check out the changelog of Meilisearch v0.28.0rc1 for more information on the changes.

πŸ’₯ Breaking changes

  • client.updateKey(key: string, options: KeyPayload): Promise<Key> now can just update the description and/or the name. #1266
  • The type EnqueuedTask now returns an taskUid instead of an uid
  • client.getTasks(...) and index.getTasks() now returns a TasksResults type containing the following fields: results, limit, from, next #1269
  • index.search changes in the response parameters: #1263
    • nbHits replaced with estimatedTotalHits
    • exhaustiveNbHits is deleted
    • exhaustiveFacetsCount is deleted
  • index.search changes in the request parameters: #1263
    • matches renamed showMatchesPosition
    • _matchesInfo response parameter is renamed _matchesPosition
    • facetsDistribution request parameter is renamed facets.
    • facetsDistribution response parameter is renamed facetDistribution.
  • The Index type and returned IndexObject does not contain a name field anymore
  • client.getIndexes and client.getRawIndexes now returns an IndexesResults type containing the following fields: results, limit, offset, total #1269
  • index.getDocuments and client.getDocuments now returns an DocumentsResults type containing the following fields: results, limit, offset, total #1269
  • index.getDocuments query parameter attributesToRetrieve is now called fields #1264
  • client.getDumpStatus has been removed #1267
  • client.createDump() now returns an EnqueuedTask #1267
  • client.generateTenantToken(apiKeyUid, searchRules, options) has now a mandatory apiKeyUid parameter which should contain the uid of a specific API key. #1268

πŸš€ Enhancements

  • client.getKeys(parameters: KeysQuery = {}) now accepts pagination parameters: limit, offset #1269
  • client.getKey(keyOrUid: string) can now also find keys based on their key uid. #1266
  • client.createKey(options: KeyCreation) lets you specify a custom uid (optionally) to create a new Key #1269
  • The returned Key now has an additional name and uid string fields. #1266
  • The indexUid field in both EnqueuedTask and Task can be null #1259
  • client.getTasks(parameters: TasksQuery = {}) and index.getTasks(parameters: TasksQuery) now accepts pagination parameters: limit, from, next and filters parameters: type, status, indexUid (same for index.getTasks) #1269
  • client.getIndexes and client.getRawIndexes now accepts pagination parameters: limit, offset #1269
  • index.getDocuments now accepts pagination parameters: limit, offset #1269
  • new MeiliSearch({ host, apiKey, headers, clientAgents }) now accept a new parameter clientAgents that should contain the agent from which the library is used. #1272

Thanks again to @bidoubiwa ! πŸŽ‰

v0.26.0 🌻

27 Jun 12:54
b9e0a21
Compare
Choose a tag to compare

⚠️ Breaking changes

πŸš€ Enhancements

  • Improve Docker configuration in the package (#1250)
  • Updated created at in index (#1220) @bidoubiwa
  • Add prototype setting for meili errors to allow instanceof operator (#1274) @mmachatschek

πŸ› Bug Fixes

  • Make updateDocuments accept partial documents in typing (#1209) @bidoubiwa
  • FIX-1222 Update EnqueuedTask to be in line with spec (#1228) @rob-moore
  • fix: TypoTolerance type has a wrong key name (#1276) @lrvinye

Thanks again to @bidoubiwa, @brunoocasali, @lrvinye, @mmachatschek, @rob-moore, @rutterjt and @susamongusacedemy! πŸŽ‰

v0.25.1 🌻

09 May 14:00
5a9eca4
Compare
Choose a tag to compare

This version makes this package compatible with Meilisearch v0.27.0 πŸŽ‰
Check out the changelog of Meilisearch v0.27.0 for more information on the changes.

Even if the minor version improved, this PR does not introduce a breaking-change!

πŸš€ Enhancements

  • Ensure nested field support #1192
  • Add the typo tolerance setting #1197
    • Add typoTolerance parameter in the Settings type.
    • Creation of: index.getTypoTolerance, index.updateTypoTolerance, index.resetTypoTolerance
  • Add highlightPreTag & highlightPostTag & cropMarker #1196

πŸ› Bug Fixes

  • Make updateDocuments accept partial documents in typing (#1209) @bidoubiwa

Thanks again to @bidoubiwa and @mmachatschek! πŸŽ‰

v0.26.0-beta.0

19 Apr 15:45
Compare
Choose a tag to compare
v0.26.0-beta.0 Pre-release
Pre-release

This beta version makes this package compatible with MeiliSearch v0.27.0rc1 πŸŽ‰
Check out the changelog of MeiliSearch v0.27.0rc1 for more information on the changes.

πŸš€ Enhancements

  • Ensure nested field support #1192
  • Add the typo tolerance setting #1197
    • Add typoTolerance parameter in the Settings type.
    • Creation of: index.getTypoTolerance, index.updateTypoTolerance, index.resetTypoTolerance
  • Add highlightPreTag & highlightPostTag & cropMarker #1196

v0.25.0 🌻

14 Mar 14:56
be800d5
Compare
Choose a tag to compare

This version makes this package compatible with MeiliSearch v0.25 up to v0.26.0 πŸŽ‰
Check out the changelog of MeiliSearch v0.26.0 for more information about the ⚠️ breaking changes about the flag and dump new behavior.

πŸš€ Enhancements

  • Added new method generateTenantToken() as a result of the addition of the multi-tenant functionality.
    This method creates a JWT tenant token that will allow the user to have multi-tenant indexes and thus restrict access to documents based on the end-user making the search request. (#1162) @bidoubiwa
  • Complete details field in tasks (#1151) @bidoubiwa
  • Add a validator on the provided host (#1168) @bidoubiwa

⚠️ Breaking changes

  • Add new method to getAllRawIndexes(), change getIndexes() behavior (#1045) @K-Kumar-01
    • client.getIndexes now returns an array of Index instances.
    • client.getRawIndexes now returns an array of object containing the indexes information returned by meilisearch
  • Change how the library exports bundles (#1161) @bidoubiwa

πŸ”’ Security

  • [Security] build(deps): bump shelljs from 0.8.4 to 0.8.5 (#1134)

Thanks again to @K-Kumar-01, @bidoubiwa, @dichotommy, and @psvnlsaikumar! πŸŽ‰

v0.24.0 🌻

12 Jan 16:05
fbc87a4
Compare
Choose a tag to compare

This package version is compatible with MeiliSearch v0.25.0 πŸŽ‰

⚠️ Breaking changes

  • This package is only compatible with MeiliSearch v0.25.0 and later, but not with v0.24.0 and older. Be sure you are using at least MeiliSearch v0.24.0 or newer before doing the upgrade.
    Why isn't it compatible?
    • MeiliSearch v0.25.0 uses Authorization header instead of X-Meili-API-Key
    • MeiliSearch v0.25.0 has a new API regarding the updates that have been renamed into tasks. More details in the following points
  • Changes related to the new task API (#1123) @bidoubiwa Check out the task API references and the asynchronous tasks guide
    • createIndex, updateIndex and deleteIndex are now asynchrone regarding MeiliSearch and do not return a Index instance anymore, but a task object. Please use index() method instead.
    • Rename index.getAllUpdateStatus into index.getTasks
    • Rename index.getUpdateStatus into index.getTask
    • waitForPendingUpdate is renamed into waitForTask and is accessible from index and from client
  • Remove getOrCreateIndex method (#1125) @bidoubiwa
  • Remove deleteIndexIfExists method (#1124) @bidoubiwa
  • client.getKeys() does not return an object of keys, but an array of keys. Check out keys API references.

πŸš€ Enhancements

  • Add API keys methods (#1123) @bidoubiwa
    • client.createKey()
    • client.updateKey()
    • client.deleteKey()
    • client.getKey()

Check out the documentation guide.

  • Add new methods client.getTasks() and client.getTask()

Thanks again to @bidoubiwa, @alallema and @curquiza ! πŸŽ‰