v0.14.0 🎯
This version introduces features released on Meilisearch v1.2.0 🎉
Check out the changelog of Meilisearch v1.2.0 for more information on the changes.
Check the complete CHANGELOG here: https://github.com/meilisearch/meilisearch-dart/blob/main/CHANGELOG.md
💥 Breaking changes
-
The method
deleteDocuments()now supports a different behavior. This method now takes aDeleteDocumentsQuery, which could contain the filter or theids(aka old behavior). #318 @ahmednfwela⚠️ You must configure the attributes you want to filter using theMeiliSearchIndex.filterableAttributes().
⚠️ Remember to update your Meilisearch server to v1.2.0 or newer before adopting it.Still, even being supported, the ability to receive only a list of ids is deprecated, and it will be removed soon.
// from: - Future<Task> deleteDocuments(List<Object> ids) + Future<Task> deleteDocuments(DeleteDocumentsQuery query) // to: - index.deleteDocuments([456, 4]) + index.deleteDocuments(DeleteDocumentsQuery(ids: [456, 4]))
-
Add the ability to set
filterin theDocumentsQuery. When a query with afilteris sent togetDocuments(params: DocumentsQuery)it will filter the documents like thesearchmethod. See the docs on how to use filters. #318 @ahmednfwela⚠️ You must configure the attributes you want to filter using theMeiliSearchIndex.filterableAttributes().
⚠️ Remember to update your Meilisearch server to v1.2.0 or newer before adopting it. -
MeiliSearchIndex.searchnow takes aString queryand aSearchQueryobject as the only inputs. #310 @ahmednfwela- Replace any occurrence of search
index.search('xyz', ....)withindex.search('xyz', SearchQuery(....))
- await client.index('books').search('query', sort: [], filter: ...); + await client.index('books').search('query', SearchQuery(sort: [], filter: ...));
- Replace any occurrence of search
-
Meili.geoBoundingBoxandMeili.geoRadiusnow take record values to represent thelat/lngpoints: #310 @ahmednfwela// Confusing, unclear - Meili.geoBoundingBox(3,5.3,10,20) // Not Confusing :) + Meili.geoBoundingBox((lat: 3, lng: 5.3), (lat: 10, lng: 20))
// Confusing, unclear - Meili.geoRadius(3, 5.3, 100) // Not Confusing :) + Meili.geoRadius((lat: 3, lng: 5.3), 100)
-
Change
MultiSearchQuery.queriesto be aList<IndexSearchQuery>instead of aList<SearchQuery>: #310 @ahmednfwelafinal result = await client.multiSearch(MultiSearchQuery(queries: [ - SearchQuery( + IndexSearchQuery( query: "", indexUid: index1.uid, ), - SearchQuery( + IndexSearchQuery( query: "", indexUid: index2.uid, ), ];
Enhancements:
- Introduce a new annotation
RequiredMeiliServerVersionwhich documents the version these members were introduced. #310 @ahmednfwela - Introduce filter expressions for
IS NULL,IS NOT NULL,IS EMPTY,IS NOT EMPTY. #310 @ahmednfwela - Added
filter,filterExpressionparameter toDocumentsQuery. #310 @ahmednfwela - Some internal
Queryablerefactoring to unify its behavior and avoid duplicating the code. #310 @ahmednfwela - Added a workaround for meilisearch/meilisearch#3740 by
jsonEncodingattribute names when usingfilterExpressions #310 @ahmednfwela - A new type is introduced
IndexSearchQuerywhich extendsSearchQuery. #310 @ahmednfwela- Added
copyWithtoSearchQueryandIndexSearchQuery#310 @ahmednfwela
- Added
Thanks again to @brunoocasali, @ahmednfwela! 🎉