Skip to content

Commit 9b6ef4d

Browse files
committed
Add CHANGELOG
1 parent 5b4c012 commit 9b6ef4d

File tree

1 file changed

+64
-3
lines changed

1 file changed

+64
-3
lines changed

CHANGELOG.md

Lines changed: 64 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,67 @@
22

33
# 0.14.0
44
### 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+
566

667
# 0.13.0
768

@@ -19,7 +80,7 @@
1980
```diff
2081
- final Object? facetDistribution;
2182
+ final Map<String, Map<String, int>>? facetDistribution;
22-
- final Object? matchesPosition;
83+
- final Object? matchesPosition;
2384
+ final Map<String, List<MatchPosition>>? matchesPosition;
2485
+ final Map<String, FacetStat>? facetStats;
2586
```
@@ -40,15 +101,15 @@
40101
- Changes `Searcheable`, `SearchResult`, `PaginatedSearchResult` signatures to be generic `Searcheable<T>`, `SearchResult<T>`, `PaginatedSearchResult<T>`
41102
- Adds a new `map<TOther>` method to `Searcheable<T>` and its subclasses to map the search result to a different type.
42103
- All search operations produce `Searcheable<Map<String, dynamic>>` by default, which can be mapped to other types using the `map<TOther>` method.
43-
- Revert some of the `Object?` types that were changed from `dynamic`:
104+
- Revert some of the `Object?` types that were changed from `dynamic`:
44105
- `MeiliSearchClient` class `Future<Map<String, dynamic>> health();`
45106
- `HttpRequest` class `Map<String, dynamic> headers();`
46107
- `MeiliSearchIndex` class `Future<Searcheable<Map<String, dynamic>>> search(...);`
47108
- `MeiliSearchIndex` class`Future<Map<String, dynamic>?> getDocument(Object id, {List<String> fields});`
48109
- `MeiliSearchIndex` class `Future<Result<Map<String, dynamic>>> getDocuments({DocumentsQuery? params});`
49110
- `Searcheable<T>.hits` is non-nullable now, and defaults to `const []`
50111

51-
### Changes:
112+
### Changes:
52113

53114
- Introduced new extension methods to help consumers cast `Future<Searchable<T>>` to the corresponding type:
54115
```dart

0 commit comments

Comments
 (0)