Skip to content

Releases: meilisearch/meilisearch-dart

v0.10.0 🎯

22 Mar 18:43
f763b22
Compare
Choose a tag to compare

πŸš€ Enhancements

  • Add pagination settings methods Future<Pagination> getPagination(), Future<Task> resetPagination(), Future<Task> updatePagination(Pagination pagination) on Index instances. (#264) @ahmednfwela
  • Add faceting settings methods Future<Faceting> getFaceting(), Future resetFaceting(), Future updateFaceting(Faceting faceting) on Index instances. (#265) @ahmednfwela
  • Add typo tolerance settings methods Future<TypoTolerance> getTypoTolerance(), Future<Task> resetTypoTolerance(), Future<Task> updateTypoTolerance(TypoTolerance typoTolerance) on Index instances. (#263) @ahmednfwela
  • Add filter-builder style: (#252) @ahmednfwela
    • Added filterExpression parameter to the search method, which takes a MeiliOperatorExpressionBase, you can only use the new parameter or the regular filter parameter, but not both. If both are provided, filter parameter will take priority.
    • Added new facade class Meili which contains static methods to help create filter expressions.
    • Added extension method toMeiliAttribute() to String, which is equivalent to Meili.attr.
    • Added extension method toMeiliValue() to String, num, DateTime, bool, which are equivalent to Meili.value.
      • Example: This query index.search('prince', filterExpression: Meili.eq(Meili.attribute('tag'), Meili.value("Tale"))); is the same as index.search('prince', filter: "tag = Tale").
  • Add Future<List<Task>> addDocumentsInBatches(List<Map<String, Object?>> documents, { int batchSize = 1000, String? primaryKey }) to Index instances.
  • Add Future<List<Task>> updateDocumentsInBatches(List<Map<String, Object?>> documents, { int batchSize = 1000, String? primaryKey }) to Index instances.
  • Add support to create documents from ndJson and CSV formats directly from Index with addDocumentsNdjson, addDocumentsCsv, updateDocumentsNdjson, and updateDocumentsCsv methods. (#261, #262) @ahmednfwela
  • Add support for Dio adapter customization with MeiliSearchClient.withCustomDio(url, apiKey: "secret", interceptors: [interceptor]) (e.g: you can use this to inject custom code, support to HTTP/2 and more) (#266) @ahmednfwela

Special thanks to @ahmednfwela πŸŽ‰

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! πŸŽ‰