Skip to content

Releases: meilisearch/meilisearch-dart

v0.9.1 🎯

28 Feb 16:35
420c28a
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Don't set User-Agent on web platform, use X-Meilisearch-Client instead (#257) @ahmednfwela

Thanks again to @ahmednfwela, @brunoocasali ! 🎉

v0.9.0 🎯

27 Feb 17:58
f151d65
Compare
Choose a tag to compare

⚠️ Breaking changes

  • The minimum supported Dart runtime is now 2.15. (#249) @ahmednfwela
  • Updated dio dependency from v4 to v5. (#249) @ahmednfwela
  • MeiliSearchClientImpl.connectTimeout, MeiliSearchClient.connectTimeout is now a Duration instead of int, and the default is Duration(seconds: 5). (#249) @ahmednfwela
  • From Future<Response<T>> getMethod<T>(String path, {Map<String, dynamic>? queryParameters,}); to Future<Response<T>> getMethod<T>(String path, { Object? data, Map<String, Object?>? queryParameters }) (#249) @ahmednfwela
  • Reduce usage of dynamic keyword by replacing it with Object?. (#249) @ahmednfwela
    • Queryable.toQuery was promoted from Map<String, dynamic> to Map<String, Object> due to the use of removeEmptyOrNulls
    • Result<T> had argument type T that was never used, so it was changed from List<dynamic> results; to List<T> results; and introduced a new helper function Result<TTarget> map<TTarget>(TTarget Function(T item) converter).
    • getDocuments changed signature from Future<Result> getDocuments({DocumentsQuery? params}); to Future<Result<Map<String, Object?>>> getDocuments({DocumentsQuery? params});, and now end users can call .map on the result to use their own DTO classes (using fromJson for example).
    • Future<Task> deleteDocuments(List<dynamic> ids); to Future<Task> deleteDocuments(List<Object> ids); since deleting a null id was an illegal operation.
    • Future<Task> deleteDocument(dynamic id); to Future<Task> deleteDocument(Object id);
    • Future<Task> updateDocuments(List<Map<String, dynamic>> documents, {String? primaryKey}); to Future<Task> updateDocuments(List<Map<String, Object?>> documents, {String? primaryKey});
    • Future<Task> addDocuments(List<Map<String, dynamic>> documents, {String? primaryKey}); to Future<Task> addDocuments(List<Map<String, Object?>> documents, {String? primaryKey});
    • Future<Task> deleteDocument(dynamic id); to Future<Task> deleteDocument(Object id);
    • Future<Map<String, dynamic>?> getDocument(dynamic id, {List<String> fields}); to Future<Map<String, Object?>?> getDocument(Object id, {List<String> fields});
    • Future<Searcheable> search(String? query, {...dynamic filter...}) is now a Object? filter
    • Future<Map<String, dynamic>> getRawIndex(String uid); to Future<Map<String, Object?>> getRawIndex(String uid);
    • Future<Map<String, dynamic>> health(); to Future<Map<String, Object?>> health();
    • String generateTenantToken(String uid, dynamic searchRules,... to String generateTenantToken(String uid, Object? searchRules,...
    • class TasksResults<T> { ... } to class TasksResults { ... }

🐛 Bug Fixes

Thanks again to @ahmednfwela, @brunoocasali! 🎉

v0.8.0 🎯

14 Feb 18:17
1efd0bf
Compare
Choose a tag to compare

⚠️ Breaking changes

🚀 Enhancements

  • Force CI break when the library does not support all the platforms (#241) @brunoocasali

🐛 Bug Fixes

Thanks again to @brunoocasali! 🎉

v0.7.1 🎯

01 Feb 18:00
123f723
Compare
Choose a tag to compare

🐛 Bug Fixes

  • Remove dart:mirrors dependency. Enable flutter and web platforms again. (#237) @brunoocasali

Thanks again to @brunoocasali! 🎉

v0.7.0 🎯 [deprecated]

11 Jan 22:24
792ce1f
Compare
Choose a tag to compare

This version makes this package compatible with Meilisearch v0.30.0 🎉
Check out the changelog of Meilisearch v0.30.0 for more information on the changes.

⚠️ ⚠️ Don't use this version if you're using Flutter or Web.
It is not supported due to a mistake in implementing the Queryable class.
Please use the next available version. ⚠️ ⚠️

🚀 Enhancements

  • SearchResult is now returned from search requests when it is a non-exhaustive pagination request. An instance of PaginatedSearchResult is returned when the request was made with finite pagination. (#230) @brunoocasali
  • Add Future<Task> swapIndexes(List<SwapIndex> swaps) method to swap indexes.
  • Add Future<Task> cancelTasks({CancelTasksQuery? params}) to cancel tasks based on the input query params. (#231 ) @brunoocasali
    • CancelTasksQuery has these fields:
      • int? next;
      • DateTime? beforeEnqueuedAt;
      • DateTime? afterEnqueuedAt;
      • DateTime? beforeStartedAt;
      • DateTime? afterStartedAt;
      • DateTime? beforeFinishedAt;
      • DateTime? afterFinishedAt;
      • List<int> uids;
      • List<String> statuses;
      • List<String> types;
      • List<String> indexUids;
  • Add Future<Task> deleteTasks({DeleteTasksQuery? params}) to delete old processed tasks based on the input query params. (#233) @brunoocasali
    • DeleteTasksQuery has these fields:
      • int? next;
      • DateTime? beforeEnqueuedAt;
      • DateTime? afterEnqueuedAt;
      • DateTime? beforeStartedAt;
      • DateTime? afterStartedAt;
      • DateTime? beforeFinishedAt;
      • DateTime? afterFinishedAt;
      • List<int> canceledBy;
      • List<int> uids;
      • List<String> statuses;
      • List<String> types;
      • List<String> indexUids;

💥 Breaking changes

  • TasksQuery has new fields, and some of them were renamed:
    • those fields were added:
      • int? canceledBy;
      • DateTime? beforeEnqueuedAt;
      • DateTime? afterEnqueuedAt;
      • DateTime? beforeStartedAt;
      • DateTime? afterStartedAt;
      • DateTime? beforeFinishedAt;
      • DateTime? afterFinishedAt;
      • List<int> uids;
    • those were renamed:
      • List<String> statuses; from List<String> status;
      • List<String> types; from List<String> type;
      • List<String> indexUids; from List<String> indexUid;

Thanks again to @brunoocasali! 🎉

v0.6.1 🎯

11 Jan 18:12
d51d9b0
Compare
Choose a tag to compare

🚀 Enhancements

💅 Misc

Thanks again to @Binaya-mrt, @brunoocasali, and @thicolares! 🎉

v0.6.0 🎯

11 Jul 15:44
441e87f
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

  • MeiliSearchClient#getDumpStatus method was removed. (#173) @brunoocasali
  • MeiliSearchClient#getIndexes method now return a object type Result<MeiliSearchIndex>. (#183) @brunoocasali
  • TaskInfo, TaskImpl, ClientTaskImpl are now just Task. (#185) @brunoocasali
    • The method getStatus was removed in the new class.
  • MeiliSearchClient#generateTenantToken now require a String uid which is the uid of the Key instance used to sign the token. (#187) @brunoocasali
  • MeiliSearchClient#createDump now responds with Task. (#181) @brunoocasali
  • MeiliSearchClient#getKeys method now return a object type Result<Key>. (#186), (#182) @brunoocasali
  • MeiliSearchClient#updateKey now can just update a description and/or name. (#186), (#182) @brunoocasali
  • MeiliSearchClient#getTasks method now return a object type Future<ResultTask>. (#180) @brunoocasali
  • MeiliSearchIndex#getTasks method now return a object type Future<ResultTask>. (#180) @brunoocasali
  • MeiliSearchIndex#search facetsDistribution is now facets (#175) @brunoocasali
  • MeiliSearchIndex#search matches is now showMatchesPosition (#175) @brunoocasali
  • MeiliSearchIndex#getDocuments method now return a object type Future<Result>.
  • MeiliSearchIndex#getDocuments method now accepts a object as a parameter and offset, limit, attributesToRetrieve were not longer accepted.
  • nbHits, exhaustiveNbHits, facetsDistribution, exhaustiveFacetsCount were removed from SearchResult. (#175) @brunoocasali

🚀 Enhancements

  • MeiliSearchClient#getIndexes accepts a object IndexesQuery to filter and paginate the results.
  • MeiliSearchClient#getKeys accepts a object KeysQuery to filter and paginate the results. (#186), (#182) @brunoocasali
  • MeiliSearchClient#getKey accepts both a Key#uid or Key#key value. (#186), (#182) @brunoocasali
  • MeiliSearchClient#getTasks accepts a object TasksQuery to filter and paginate the results. (#185) @brunoocasali
  • MeiliSearchIndex#getTasks accepts a object TasksQuery to filter and paginate the results. (#185) @brunoocasali
  • MeiliSearchClient#createKey can specify a uid (optionally) to create a new Key. (#186), (#182) @brunoocasali
  • MeiliSearchIndex#getDocument accepts a list of fields to reduce the final payload.
  • MeiliSearchIndex#getDocuments accepts a object DocumentsQuery to filter and paginate the results. (#184) @brunoocasali
  • Key has now a name and uid string fields. (#186), (#182) @brunoocasali
  • estimatedTotalHits, facetDistribution were added to SearchResult (#175) @brunoocasali
  • Sending a invalid uid or apiKey will raise InvalidApiKeyException. (#187) @brunoocasali
  • Remove unused generic T in search method (#176) @ShakyaCsun

💅 Misc

Thanks again to @ShakyaCsun, @brunoocasali, @dependabot ! 🎉

v0.5.3 🎯

09 May 13:04
9ece5fa
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.

🚀 Enhancements

💅 Misc

Thanks again to @mafreud and @brunoocasali! 🎉

v0.5.2 🎯

14 Mar 15:44
e78223b
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. (#139) @brunoocasali

Thanks again to @brunoocasali! 🎉

v0.5.1 🎯

20 Jan 19:49
1c8bb4f
Compare
Choose a tag to compare

🚀 Enhancements

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 @brunoocasali! 🎉