|
1 | 1 | [comment]: <> (All notable changes to this project will be documented in this file.)
|
2 | 2 |
|
| 3 | +# 0.14.0 |
| 4 | +### Breaking Changes: |
| 5 | +- Moved `indexUid`, `query` from `SearchQuery` to the new `IndexSearchQuery`. |
| 6 | +- Changed `deleteDocuments` signature: |
| 7 | + |
| 8 | +```diff |
| 9 | +// from: |
| 10 | +- Future<Task> deleteDocuments(List<Object> ids) |
| 11 | ++ Future<Task> deleteDocuments(DeleteDocumentsQuery query) |
| 12 | + |
| 13 | +// to: |
| 14 | +- index.deleteDocuments([456, 4]) |
| 15 | ++ index.deleteDocuments(DeleteDocumentsQuery(ids: [456, 4])) |
| 16 | +``` |
| 17 | + |
| 18 | +- `MeiliSearchIndex.search` now takes a `String query` and a `SearchQuery` object as the only inputs. |
| 19 | + - Replace any ocurrence of search `index.search('xyz', ....)` with `index.search('xyz', SearchQuery(....))` |
| 20 | + |
| 21 | +```diff |
| 22 | +- await client.index('books').search('query', sort: [], filter: ...); |
| 23 | ++ await client.index('books').search('query', SearchQuery(sort: [], filter: ...)); |
| 24 | +``` |
| 25 | + |
| 26 | +- `Meili.geoBoundingBox` and `Meili.geoRadius` now take record values to represent the `lat`/`lng` points: |
| 27 | +```diff |
| 28 | +// Confusing, unclear |
| 29 | +- Meili.geoBoundingBox(3,5.3,10,20) |
| 30 | +// Not Confusing :) |
| 31 | ++ Meili.geoBoundingBox((lat: 3, lng: 5.3), (lat: 10, lng: 20)) |
| 32 | +``` |
| 33 | +```diff |
| 34 | +// Confusing, unclear |
| 35 | +- Meili.geoRadius(3, 5.3, 100) |
| 36 | +// Not Confusing :) |
| 37 | ++ Meili.geoRadius((lat: 3, lng: 5.3), 100) |
| 38 | +``` |
| 39 | + |
| 40 | +- Change `MultiSearchQuery.queries` to be a `List<IndexSearchQuery>` instead of a `List<SearchQuery>`: |
| 41 | +```diff |
| 42 | +final result = await client.multiSearch(MultiSearchQuery(queries: [ |
| 43 | +- SearchQuery( |
| 44 | ++ IndexSearchQuery( |
| 45 | + query: "", |
| 46 | + indexUid: index1.uid, |
| 47 | + ), |
| 48 | +- SearchQuery( |
| 49 | ++ IndexSearchQuery( |
| 50 | + query: "", |
| 51 | + indexUid: index2.uid, |
| 52 | + ), |
| 53 | +]; |
| 54 | +``` |
| 55 | + |
| 56 | +### Changes: |
| 57 | + |
| 58 | +- Introduce a new annotation `RequiredMeiliServerVersion` which documents the version this members were introduced. |
| 59 | +- Introduce filter expressions for `IS NULL`, `IS NOT NULL`, `IS EMPTY`, `IS NOT EMPTY`. |
| 60 | +- Added `filter`, `filterExpression` parameter to `DocumentsQuery`. |
| 61 | +- Some internal `Queryable` refactoring to unify its behavior and avoid duplicating the code. |
| 62 | +- Added a workaround for https://github.com/meilisearch/meilisearch/issues/3740 by `jsonEncoding` attribute names when using `filterExpression`s |
| 63 | +- A new type is introduced `IndexSearchQuery` which extends `SearchQuery`. |
| 64 | + - Added `copyWith` to `SearchQuery` and `IndexSearchQuery` |
| 65 | + |
| 66 | + |
3 | 67 | # 0.13.0
|
4 | 68 |
|
5 | 69 | ### Breaking Changes
|
|
16 | 80 | ```diff
|
17 | 81 | - final Object? facetDistribution;
|
18 | 82 | + final Map<String, Map<String, int>>? facetDistribution;
|
19 |
| -- final Object? matchesPosition; |
| 83 | +- final Object? matchesPosition; |
20 | 84 | + final Map<String, List<MatchPosition>>? matchesPosition;
|
21 | 85 | + final Map<String, FacetStat>? facetStats;
|
22 | 86 | ```
|
|
37 | 101 | - Changes `Searcheable`, `SearchResult`, `PaginatedSearchResult` signatures to be generic `Searcheable<T>`, `SearchResult<T>`, `PaginatedSearchResult<T>`
|
38 | 102 | - Adds a new `map<TOther>` method to `Searcheable<T>` and its subclasses to map the search result to a different type.
|
39 | 103 | - All search operations produce `Searcheable<Map<String, dynamic>>` by default, which can be mapped to other types using the `map<TOther>` method.
|
40 |
| -- Revert some of the `Object?` types that were changed from `dynamic`: |
| 104 | +- Revert some of the `Object?` types that were changed from `dynamic`: |
41 | 105 | - `MeiliSearchClient` class `Future<Map<String, dynamic>> health();`
|
42 | 106 | - `HttpRequest` class `Map<String, dynamic> headers();`
|
43 | 107 | - `MeiliSearchIndex` class `Future<Searcheable<Map<String, dynamic>>> search(...);`
|
44 | 108 | - `MeiliSearchIndex` class`Future<Map<String, dynamic>?> getDocument(Object id, {List<String> fields});`
|
45 | 109 | - `MeiliSearchIndex` class `Future<Result<Map<String, dynamic>>> getDocuments({DocumentsQuery? params});`
|
46 | 110 | - `Searcheable<T>.hits` is non-nullable now, and defaults to `const []`
|
47 | 111 |
|
48 |
| -### Changes: |
| 112 | +### Changes: |
49 | 113 |
|
50 | 114 | - Introduced new extension methods to help consumers cast `Future<Searchable<T>>` to the corresponding type:
|
51 | 115 | ```dart
|
|
0 commit comments