Releases: meilisearch/meilisearch-dart
v0.10.0 π―
π Enhancements
- Add pagination settings methods
Future<Pagination> getPagination()
,Future<Task> resetPagination()
,Future<Task> updatePagination(Pagination pagination)
onIndex
instances. (#264) @ahmednfwela - Add faceting settings methods
Future<Faceting> getFaceting(),
Future resetFaceting(),
Future updateFaceting(Faceting faceting) onIndex
instances. (#265) @ahmednfwela - Add typo tolerance settings methods
Future<TypoTolerance> getTypoTolerance()
,Future<Task> resetTypoTolerance()
,Future<Task> updateTypoTolerance(TypoTolerance typoTolerance)
onIndex
instances. (#263) @ahmednfwela - Add filter-builder style: (#252) @ahmednfwela
- Added
filterExpression
parameter to the search method, which takes aMeiliOperatorExpressionBase
, 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()
toString
, which is equivalent to Meili.attr. - Added extension method
toMeiliValue()
toString
,num
,DateTime
,bool
, which are equivalent toMeili
.value.- Example: This query
index.search('prince', filterExpression: Meili.eq(Meili.attribute('tag'), Meili.value("Tale")));
is the same asindex.search('prince', filter: "tag = Tale")
.
- Example: This query
- Added
- Add
Future<List<Task>> addDocumentsInBatches(List<Map<String, Object?>> documents, { int batchSize = 1000, String? primaryKey })
toIndex
instances. - Add
Future<List<Task>> updateDocumentsInBatches(List<Map<String, Object?>> documents, { int batchSize = 1000, String? primaryKey })
toIndex
instances. - Add support to create documents from
ndJson
andCSV
formats directly fromIndex
withaddDocumentsNdjson
,addDocumentsCsv
,updateDocumentsNdjson
, andupdateDocumentsCsv
methods. (#261, #262) @ahmednfwela - Add support for
Dio
adapter customization withMeiliSearchClient.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 π―
π 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 π―
β οΈ Breaking changes
- The minimum supported Dart runtime is now
2.15
. (#249) @ahmednfwela - Updated
dio
dependency fromv4
tov5
. (#249) @ahmednfwela MeiliSearchClientImpl.connectTimeout
,MeiliSearchClient.connectTimeout
is now aDuration
instead ofint
, and the default isDuration(seconds: 5)
. (#249) @ahmednfwela- From
Future<Response<T>> getMethod<T>(String path, {Map<String, dynamic>? queryParameters,});
toFuture<Response<T>> getMethod<T>(String path, { Object? data, Map<String, Object?>? queryParameters })
(#249) @ahmednfwela - Reduce usage of
dynamic
keyword by replacing it withObject?
. (#249) @ahmednfwelaQueryable.toQuery
was promoted fromMap<String, dynamic>
toMap<String, Object>
due to the use ofremoveEmptyOrNulls
Result<T>
had argument typeT
that was never used, so it was changed fromList<dynamic> results;
toList<T> results;
and introduced a new helper functionResult<TTarget> map<TTarget>(TTarget Function(T item) converter)
.getDocuments
changed signature fromFuture<Result> getDocuments({DocumentsQuery? params});
toFuture<Result<Map<String, Object?>>> getDocuments({DocumentsQuery? params});
, and now end users can call.map
on the result to use their own DTO classes (usingfromJson
for example).Future<Task> deleteDocuments(List<dynamic> ids);
toFuture<Task> deleteDocuments(List<Object> ids);
since deleting anull
id was an illegal operation.Future<Task> deleteDocument(dynamic id);
toFuture<Task> deleteDocument(Object id);
Future<Task> updateDocuments(List<Map<String, dynamic>> documents, {String? primaryKey});
toFuture<Task> updateDocuments(List<Map<String, Object?>> documents, {String? primaryKey});
Future<Task> addDocuments(List<Map<String, dynamic>> documents, {String? primaryKey});
toFuture<Task> addDocuments(List<Map<String, Object?>> documents, {String? primaryKey});
Future<Task> deleteDocument(dynamic id);
toFuture<Task> deleteDocument(Object id);
Future<Map<String, dynamic>?> getDocument(dynamic id, {List<String> fields});
toFuture<Map<String, Object?>?> getDocument(Object id, {List<String> fields});
Future<Searcheable> search(String? query, {...dynamic filter...})
is now aObject? filter
Future<Map<String, dynamic>> getRawIndex(String uid);
toFuture<Map<String, Object?>> getRawIndex(String uid);
Future<Map<String, dynamic>> health();
toFuture<Map<String, Object?>> health();
String generateTenantToken(String uid, dynamic searchRules,...
toString generateTenantToken(String uid, Object? searchRules,...
class TasksResults<T> { ... }
toclass TasksResults { ... }
π Bug Fixes
- Fix
createKey
withuid
(#250) @brunoocasali
Thanks again to @ahmednfwela, @brunoocasali! π
v0.8.0 π―
β οΈ Breaking changes
- Add
indexUid
toTask
(#240) @brunoocasali - Add exported files to the meilisearch.dart (#244) @brunoocasali
π Enhancements
- Force CI break when the library does not support all the platforms (#241) @brunoocasali
π Bug Fixes
- Add exported files to the meilisearch.dart (#244) @brunoocasali
Thanks again to @brunoocasali! π
v0.7.1 π―
π Bug Fixes
- Remove
dart:mirrors
dependency. Enableflutter
andweb
platforms again. (#237) @brunoocasali
Thanks again to @brunoocasali! π
v0.7.0 π― [deprecated]
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.
It is not supported due to a mistake in implementing the Queryable
class.
Please use the next available version.
π Enhancements
SearchResult
is now returned fromsearch
requests when it is a non-exhaustive pagination request. An instance ofPaginatedSearchResult
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 ) @brunoocasaliCancelTasksQuery
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) @brunoocasaliDeleteTasksQuery
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;
fromList<String> status;
List<String> types;
fromList<String> type;
List<String> indexUids;
fromList<String> indexUid;
- those fields were added:
Thanks again to @brunoocasali! π
v0.6.1 π―
π Enhancements
- Add support to
matchingStrategy
search parameter (#216) @thicolares - Add new code-samples for
matchingStrategy
(#215) @thicolares
π Misc
- Changed
MEILISEARCH_HOST
toMEILISEARCH_URL
(#208) @Binaya-mrt - Rename dependabot.yaml to dependabot.yml (#211) @brunoocasali
- Add extra info to pub.dev (#218) @brunoocasali
Thanks again to @Binaya-mrt, @brunoocasali, and @thicolares! π
v0.6.0 π―
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) @brunoocasaliMeiliSearchClient#getIndexes
method now return a object typeResult<MeiliSearchIndex>
. (#183) @brunoocasaliTaskInfo
,TaskImpl
,ClientTaskImpl
are now justTask
. (#185) @brunoocasali- The method
getStatus
was removed in the new class.
- The method
MeiliSearchClient#generateTenantToken
now require aString uid
which is theuid
of theKey
instance used to sign the token. (#187) @brunoocasaliMeiliSearchClient#createDump
now responds withTask
. (#181) @brunoocasaliMeiliSearchClient#getKeys
method now return a object typeResult<Key>
. (#186), (#182) @brunoocasaliMeiliSearchClient#updateKey
now can just update adescription
and/orname
. (#186), (#182) @brunoocasaliMeiliSearchClient#getTasks
method now return a object typeFuture<ResultTask>
. (#180) @brunoocasaliMeiliSearchIndex#getTasks
method now return a object typeFuture<ResultTask>
. (#180) @brunoocasaliMeiliSearchIndex#search
facetsDistribution
is nowfacets
(#175) @brunoocasaliMeiliSearchIndex#search
matches
is nowshowMatchesPosition
(#175) @brunoocasaliMeiliSearchIndex#getDocuments
method now return a object typeFuture<Result>
.MeiliSearchIndex#getDocuments
method now accepts a object as a parameter andoffset
,limit
,attributesToRetrieve
were not longer accepted.nbHits
,exhaustiveNbHits
,facetsDistribution
,exhaustiveFacetsCount
were removed fromSearchResult
. (#175) @brunoocasali
π Enhancements
MeiliSearchClient#getIndexes
accepts a objectIndexesQuery
to filter and paginate the results.MeiliSearchClient#getKeys
accepts a objectKeysQuery
to filter and paginate the results. (#186), (#182) @brunoocasaliMeiliSearchClient#getKey
accepts both aKey#uid
orKey#key
value. (#186), (#182) @brunoocasaliMeiliSearchClient#getTasks
accepts a objectTasksQuery
to filter and paginate the results. (#185) @brunoocasaliMeiliSearchIndex#getTasks
accepts a objectTasksQuery
to filter and paginate the results. (#185) @brunoocasaliMeiliSearchClient#createKey
can specify auid
(optionally) to create a newKey
. (#186), (#182) @brunoocasaliMeiliSearchIndex#getDocument
accepts a list of fields to reduce the final payload.MeiliSearchIndex#getDocuments
accepts a objectDocumentsQuery
to filter and paginate the results. (#184) @brunoocasaliKey
has now aname
anduid
string fields. (#186), (#182) @brunoocasaliestimatedTotalHits
,facetDistribution
were added toSearchResult
(#175) @brunoocasali- Sending a invalid
uid
orapiKey
will raiseInvalidApiKeyException
. (#187) @brunoocasali - Remove unused generic T in search method (#176) @ShakyaCsun
π Misc
- Improve Docker configuration in the package (#164) @brunoocasali
- Add test for
filter
paramter with spaces (#179) @ShakyaCsun - Improve pub spec score points (#171) @brunoocasali
Thanks again to @ShakyaCsun, @brunoocasali, @dependabot ! π
v0.5.3 π―
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
- Ensure nested field support (#157) @brunoocasali
- Add
highlightPreTag
,highlightPostTag
,cropMarker
, parameters in the search request (#156) @brunoocasali
π Misc
Thanks again to @mafreud and @brunoocasali! π
v0.5.2 π―
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
π 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! π