From e40b2efcd69f62407baa1e673a10a5e0cb26ff9e Mon Sep 17 00:00:00 2001 From: meili-bot <74670311+meili-bot@users.noreply.github.com> Date: Mon, 5 Jun 2023 13:36:09 -0300 Subject: [PATCH 1/5] Update lib/src/version.dart --- lib/src/version.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/version.dart b/lib/src/version.dart index 2eab51de..84e9c1de 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,5 +1,5 @@ class Version { - static const String current = '0.13.0'; + static const String current = '0.14.0'; static String get qualifiedVersion { return "Meilisearch Dart (v$current)"; From 17d6d51d0d15f13f39099c54513f938bcc68e871 Mon Sep 17 00:00:00 2001 From: meili-bot <74670311+meili-bot@users.noreply.github.com> Date: Mon, 5 Jun 2023 13:36:10 -0300 Subject: [PATCH 2/5] Update pubspec.yaml --- pubspec.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pubspec.yaml b/pubspec.yaml index bef7ad52..418e70ea 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: meilisearch description: Meilisearch Dart is the Meilisearch API client for Dart and Flutter developers. -version: 0.13.0 +version: 0.14.0 homepage: https://meilisearch.com repository: https://github.com/meilisearch/meilisearch-dart issue_tracker: https://github.com/meilisearch/meilisearch-dart/issues From eb92da21cb2c8f19a33a9424a47c130b0016acdf Mon Sep 17 00:00:00 2001 From: meili-bot <74670311+meili-bot@users.noreply.github.com> Date: Mon, 5 Jun 2023 13:36:10 -0300 Subject: [PATCH 3/5] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3e576ef5..614235bf 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ You can install the **meilisearch** package by adding a few lines into `pubspec. ```yaml dependencies: - meilisearch: ^0.13.0 + meilisearch: ^0.14.0 ``` Then open your terminal and update dart packages. From 5b4c012a19628bbe5e7fabf5b66676f9b5265dc0 Mon Sep 17 00:00:00 2001 From: meili-bot <74670311+meili-bot@users.noreply.github.com> Date: Mon, 5 Jun 2023 13:36:11 -0300 Subject: [PATCH 4/5] Update CHANGELOG.md --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a4fe86..dfa6b74b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ [comment]: <> (All notable changes to this project will be documented in this file.) +# 0.14.0 +### Breaking Changes: + # 0.13.0 ### Breaking Changes From 9b6ef4ddc0b52f51cd40c99b9447f734e4cd4530 Mon Sep 17 00:00:00 2001 From: Bruno Casali Date: Mon, 5 Jun 2023 13:55:57 -0300 Subject: [PATCH 5/5] Add CHANGELOG --- CHANGELOG.md | 67 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 64 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dfa6b74b..52a52aaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,67 @@ # 0.14.0 ### Breaking Changes: +- Moved `indexUid`, `query` from `SearchQuery` to the new `IndexSearchQuery`. +- Changed `deleteDocuments` signature: + +```diff +// from: +- Future deleteDocuments(List ids) ++ Future deleteDocuments(DeleteDocumentsQuery query) + +// to: +- index.deleteDocuments([456, 4]) ++ index.deleteDocuments(DeleteDocumentsQuery(ids: [456, 4])) +``` + +- `MeiliSearchIndex.search` now takes a `String query` and a `SearchQuery` object as the only inputs. + - Replace any ocurrence of search `index.search('xyz', ....)` with `index.search('xyz', SearchQuery(....))` + +```diff +- await client.index('books').search('query', sort: [], filter: ...); ++ await client.index('books').search('query', SearchQuery(sort: [], filter: ...)); +``` + +- `Meili.geoBoundingBox` and `Meili.geoRadius` now take record values to represent the `lat`/`lng` points: +```diff +// Confusing, unclear +- Meili.geoBoundingBox(3,5.3,10,20) +// Not Confusing :) ++ Meili.geoBoundingBox((lat: 3, lng: 5.3), (lat: 10, lng: 20)) +``` +```diff +// Confusing, unclear +- Meili.geoRadius(3, 5.3, 100) +// Not Confusing :) ++ Meili.geoRadius((lat: 3, lng: 5.3), 100) +``` + +- Change `MultiSearchQuery.queries` to be a `List` instead of a `List`: +```diff +final result = await client.multiSearch(MultiSearchQuery(queries: [ +- SearchQuery( ++ IndexSearchQuery( + query: "", + indexUid: index1.uid, + ), +- SearchQuery( ++ IndexSearchQuery( + query: "", + indexUid: index2.uid, + ), +]; +``` + +### Changes: + +- Introduce a new annotation `RequiredMeiliServerVersion` which documents the version this members were introduced. +- Introduce filter expressions for `IS NULL`, `IS NOT NULL`, `IS EMPTY`, `IS NOT EMPTY`. +- Added `filter`, `filterExpression` parameter to `DocumentsQuery`. +- Some internal `Queryable` refactoring to unify its behavior and avoid duplicating the code. +- Added a workaround for https://github.com/meilisearch/meilisearch/issues/3740 by `jsonEncoding` attribute names when using `filterExpression`s +- A new type is introduced `IndexSearchQuery` which extends `SearchQuery`. + - Added `copyWith` to `SearchQuery` and `IndexSearchQuery` + # 0.13.0 @@ -19,7 +80,7 @@ ```diff - final Object? facetDistribution; + final Map>? facetDistribution; -- final Object? matchesPosition; +- final Object? matchesPosition; + final Map>? matchesPosition; + final Map? facetStats; ``` @@ -40,7 +101,7 @@ - Changes `Searcheable`, `SearchResult`, `PaginatedSearchResult` signatures to be generic `Searcheable`, `SearchResult`, `PaginatedSearchResult` - Adds a new `map` method to `Searcheable` and its subclasses to map the search result to a different type. - All search operations produce `Searcheable>` by default, which can be mapped to other types using the `map` method. -- Revert some of the `Object?` types that were changed from `dynamic`: +- Revert some of the `Object?` types that were changed from `dynamic`: - `MeiliSearchClient` class `Future> health();` - `HttpRequest` class `Map headers();` - `MeiliSearchIndex` class `Future>> search(...);` @@ -48,7 +109,7 @@ - `MeiliSearchIndex` class `Future>> getDocuments({DocumentsQuery? params});` - `Searcheable.hits` is non-nullable now, and defaults to `const []` -### Changes: +### Changes: - Introduced new extension methods to help consumers cast `Future>` to the corresponding type: ```dart