Skip to content

Releases: meilisearch/meilisearch-swift

0.11.0 🕊

13 Oct 11:23
352df07
Compare
Choose a tag to compare

Changes

Breaking changes ⚠️

  • Fix: remove charset=utf-8 from Content-Type header (#205) @curquiza

Thanks again to @bidoubiwa, @curquiza ! 🎉

0.10.0 🕊

23 Sep 13:28
dccdfa8
Compare
Choose a tag to compare

Changes

Breaking changes ⚠️

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 🕊

21 Sep 09:06
8cb0cce
Compare
Choose a tag to compare

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 🕊

13 Sep 21:37
0fc0ce3
Compare
Choose a tag to compare

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 🕊

02 Sep 16:18
9a89a98
Compare
Choose a tag to compare

Changes

Thanks again to @bidoubiwa ! 🎉

0.8.0 🕊

31 Aug 12:04
169f529
Compare
Choose a tag to compare

This version makes this package compatible with MeiliSearch v0.21.0
🎉 Check out the changelog of MeiliSearch v0.21.0

Changes

Breaking changes ⚠️

  • Remove host http checking on client creation (#142) @bidoubiwa

  • Refactor MeiliSearch Client (#144) @bidoubiwa
    Config instance is removed and the default value of hostURL 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 in addDocuments and updateDocuments

  • Change builDate into commitDate in Version Model (#165) @bidoubiwa

  • Change attributesforfaceting to filterableattributes (#170) @bidoubiwa
    All mentions of attributesForFaceting have been changed with filterableAttributes.

  • Filters to filter (#171) @bidoubiwa
    Search parametersfilters and facetFilters have been merged into one filter 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 🕊

05 May 08:58
187ef67
Compare
Choose a tag to compare

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.

Thanks again to @alallema, @curquiza and @ppamorim! 🎉

v0.7.0 🕊

31 Mar 09:17
10628e7
Compare
Choose a tag to compare

Breaking changes ⚠️

This version of this library makes it fully compatible with MeiliSearch v0.20.0.

v0.6.1 🕊

13 Jan 12:33
31d4965
Compare
Choose a tag to compare

Changes

Thanks again to @curquiza, and @felix-gohla ! 🎉

v0.6.0 🕊

04 Nov 16:14
46d951b
Compare
Choose a tag to compare

Breaking changes ⚠️

Also thanks to @bidoubiwa and @ppamorim! 🎉