Releases: meilisearch/meilisearch-swift
0.11.0 🕊
0.10.0 🕊
Changes
Breaking changes ⚠️
- Move stats method to index class (#200) @bidoubiwa
- Move settings methods to index class (#198) @bidoubiwa
- Move updates method in index class (#197) @bidoubiwa
- Move search method to index (#196) @bidoubiwa
- Move documents method to index (#195) @bidoubiwa
- Make Indexes a public class containing all index related methods (#193) @bidoubiwa
Index is now a public Class required for most of the indexes related methods
In MeiliSearch some actions are for the whole MeiliSearch and other specifically for indexes.
For example GET /stats
is about the MeiliSearch instance but GET indexes/myIndex/documents
is about a specific index.
All specific actions linked to an index are now available through an instance of the Indexes
class.
Before
client.addDocuments(documents)
After
Now, these methods are only available in the Indexes
class.
let index = client.index("myIndex")
index.getDocuments().
Or
client.index(myIndex").getDocuments()
The following method are still available in a Client instance and return an Index
instance:
client.index("myIndex")
createIndex(uid: "myIndex")
getOrCreateIndex(uid: "myIndex")
getindex("myIndex")
getindexes("myIndex")
-> returns an array of Indexes()
Methods moved
Every method related to a specific index
are now only available in an Index instance.
Please refer to every related PR to find out.
Parameters label removed/added/renamed
Some methods saw their parameter declaration changed to make the usage more explicit and to add some needed data.
Example:
createIndex(UID: String, _ completion: ...)
Became:
createIndex(uid: String, primaryKey: String? = nil, _ completion: ...)
All required UID
labels became uid
. As seen in the example above.
Index instance creation does not make an HTTP call
When creating an index instance
let index = client.index("myIndex")
It will not make an HTTP call. Thus the index instance will only have the information about the uid.
To complete the information of the Index or just if you need some additional information please use client.getIndex("myIndex")
.
This will also return an Index instance but with all information related to an index:
uid
primaryKey
createdAt
updatedAt
Thanks again to @bidoubiwa ! 🎉
0.9.0 🕊
Changes
- Add support to Encodable types for updateDocuments function (#188) @bidoubiwa
- Make update settings not override previous settings (#189) @bidoubiwa
Breaking changes ⚠️
- Change get/update/resetSetting to get/update/resetSettings with a s (#190) @bidoubiwa
Thanks again to @bidoubiwa ! 🎉
0.8.2 🕊
This package version is compatible with MeiliSearch v0.22.0 🎉
Changes
- Add get/update/reset sortable attributes methods (#183) @bidoubiwa
- Changes related to the next MeiliSearch release (v0.22.0) (#181)
Thanks again to @bidoubiwa, @curquiza ! 🎉
0.8.1 🕊
0.8.0 🕊
This version makes this package compatible with MeiliSearch v0.21.0
🎉 Check out the changelog of MeiliSearch v0.21.0
Changes
- Add processing status in updates (#166) @bidoubiwa
- Add startedAt and finishedAt to dump status (#172) @bidoubiwa
Breaking changes ⚠️
-
Remove host http checking on client creation (#142) @bidoubiwa
-
Refactor MeiliSearch Client (#144) @bidoubiwa
Config instance is removed and the default value ofhostURL
is removed as well. See PR for more in depth.
Before:MeiliSearch(Config(hostURL: String?, apiKey: String?, session: session?)
After: see next breaking change
-
Change in MeiliSearch hostURL to host and make labels mandatory (#159) @bidoubiwa
MeiliSearch(host: String, apiKey: String? = nil, session: URLSessionProtocol? = nil)
-
Add query parameters and default values in document routes (#160) @bidoubiwa
Usage:getDocuments<T>(UID: String, options: GetParameters? = nil)
GetParameters:
public struct GetParameters: Codable, Equatable { // MARK: Properties /// Number of documents to take. public let limit: Int? /// Number of documents to skip. public let offset: Int? /// Document attributes to show. public let attributesToRetrieve: [String]?
ApiKey is now
nil
by default inaddDocuments
andupdateDocuments
-
Change builDate into commitDate in Version Model (#165) @bidoubiwa
-
Change attributesforfaceting to filterableattributes (#170) @bidoubiwa
All mentions ofattributesForFaceting
have been changed withfilterableAttributes
. -
Filters to filter (#171) @bidoubiwa
Search parametersfilters
andfacetFilters
have been merged into onefilter
parameter -
Change fieldsFrequency to fieldDistribution in stats model (#173) @bidoubiwa
-
Add null values on synonyms and stop words (#175) @bidoubiwa
-
Changes related to the next MeiliSearch release (v0.21.0) (#117)
Thanks again to @bidoubiwa, @curquiza and, @ppamorim! 🎉
0.7.1 🕊
Changes
New
MeiliSearch-Swift is now available through CocoaPods. To install it, add the following line to your Podfile:
pod 'MeiliSearch'
Then, run the following command:
pod install
This will download the latest version of MeiliSearch pod and prepare the xcworkspace
.
v0.7.0 🕊
v0.6.1 🕊
Changes
- Make SearchParameters initializer public (#98) @felix-gohla
Thanks again to @curquiza, and @felix-gohla ! 🎉