Releases: meilisearch/meilisearch-js
v0.24.0 🌻
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
Authorizationheader instead ofX-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
- MeiliSearch v0.25.0 uses
- Changes related to the new task API (#1123) @bidoubiwa Check out the task API references and the asynchronous tasks guide
createIndex,updateIndexanddeleteIndexare now asynchrone regarding MeiliSearch and do not return aIndexinstance anymore, but a task object. Please useindex()method instead.- Rename
index.getAllUpdateStatusintoindex.getTasks - Rename
index.getUpdateStatusintoindex.getTask waitForPendingUpdateis renamed intowaitForTaskand is accessible fromindexand fromclient
- Remove
getOrCreateIndexmethod (#1125) @bidoubiwa - Remove
deleteIndexIfExistsmethod (#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()andclient.getTask()
Thanks again to @bidoubiwa, @alallema and @curquiza ! 🎉
v0.24.0-beta.1
This package version is compatible with MeiliSearch v0.25.0.rc3 🎉
⚠️ Breaking changes
- Wrap keys results inside
resultsobject #1132
Thanks again to @bidoubiwa! 🎉
v0.24.0-beta.0
This package version is compatible with MeiliSearch v0.25.0.rc3 🎉
⚠️ Breaking changes
- Changes related to the next MeiliSearch release (v0.24.0) (#1108)
- Change update API to task API #1123
- Remove deleteIfExists method #1124
- Remove get or create index #1125
- Change key methods #1123
Thanks again to @bidoubiwa! 🎉
v0.23.0 🌻
This package version is compatible with MeiliSearch v0.24.0 🎉
⚠️ Breaking changes
- Changes related to the next MeiliSearch release (v0.24.0) (#1074)
Errors API changes
MeiliSearchApiError interface receives an update in the fields naming. Error fields are replaced by the following:
errorCode->codeerrorLink->linkerrorType->type
When an update fails, previously the error fields in the update body were also namederrorCode, errorLink, ...
Now error fields are moved inside the error and the naming is changing the same way it did in MeiliSearchApiError.
{
"status": "failed",
"updateId": 1,
// ...
"error": {
"message": "Document `:documentId` not found.",
"code": "document_not_found",
"type": "invalid_request",
"link": "https://docs.meilisearch.com/errors#document_not_found"
},
}
Thanks again to @bidoubiwa! 🎉
v0.23.0-beta.0
Beta
The beta version is compatible with the latest rc of MeiliSearch.
v0.22.3 🌻
v0.22.2 🌻
Changes
- Add extended JSDoc for each function (#1058) @blenderskool
Thanks again to @K-Kumar-01, @Toshiuk, @alallema, @bidoubiwa, @blenderskool, @curquiza, and Flavio Toshiuk Junior! 🎉
v0.22.1 🌻
Changes
- Add methods to automatically add/update documents in batches (#1039) @vishnugt
- Add an API to get raw index data (#1051) @artfuldev
Document in Batches
This method will let you add documents in batches of 1000 documents instead of all at once.
await client
.index("myIndex")
.addDocumentsInBatches(dataset, 1000)This method will let you update documents in batches of 1000 documents instead of all at once.
await client
.index("myIndex")
.updateDocumentsInBatches(dataset, 1000)Raw index data
Instead of having an instance of Index returned, you receive the raw json returned by MeiliSearch.
await client
.index("myIndex")
.getRawInfo()Thanks again to @K-Kumar-01, @SandunWebDev, @artfuldev, @bidoubiwa, @curquiza, @daniloff200, and @vishnugt! 🎉
v0.22.0 🌻
Changes
- Improve error handler returns (#1015) @bidoubiwa
Breaking changes ⚠️
- refactor(#920): Update the method names version and stats to become getVersion and getStats (#1016) @TheLearneer
- refactor(#921): Change parameter order in static Index.create method (#1017) @TheLearneer
- Changes name of listIndexes to getIndexes (#1022) @drph4nt0m
- Add http protocol at the beginning of the URL if not present (#1027) @sushrut111
version and stats become getVersion and getStats
Before:
client.version()
client.stats()becomes:
client.getVersion()
client.getStats()Parameter order in Index.Create
Before
Index.create(config, uid, options)Becomes
Index.create(uid, options, config)listIndexes becomes getindexes
Before
client.listIndexes()Becomes
client.getIndexes()Http protocol added to URL that do not have one
const client = new MeiliSearch({ host: "meilisearch" })host will be transformed into http://meilisearch
Contributors
Thanks again to @TheLearneer, @bidoubiwa, @donno2048, @drph4nt0m, and @sushrut111! 🎉
v0.21.0 🌻
Changes
- [Security] Bump ansi-regex from 5.0.0 to 5.0.1 (#1011)
Breaking changes ⚠️
- Remove unnecessary type complexity on searchParameters (#1007) @bidoubiwa
Thanks again to @bidoubiwa, and @gmourier! 🎉