dsonawave
dsonawave

Reputation: 167

how to push firestore data to algolia Swift

I've been doing research for the last several hours finding out how to do full text search in iOS apps with Firestore. I eventually realized full-text search is not supported. I read up on Algolia, watched tutorials, read articles and still don't see a way to push data from Firestore to Algolia in Swift. Can somebody guide me to a post or maybe add like a code snippet or something to show me how I can use this software? Thanks.

Upvotes: 1

Views: 447

Answers (1)

Muthu Thavamani
Muthu Thavamani

Reputation: 1405

Algolia offers SWIFT API client

Swift API client is an open source, production-ready API wrapper that abstracts from the complexity of directly interfacing with the Algolia Search API

Basically to work with algolia using any API client, you have to do few things,

  1. Install the algolia client

https://www.algolia.com/doc/api-client/getting-started/install/swift/?client=swift

  1. Initialize the client with your application ID and KEY

https://www.algolia.com/doc/api-client/getting-started/instantiate-client-index/

  1. Indexing your data & Setup searchable attributes

https://www.algolia.com/doc/api-client/methods/indexing/ https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/

  1. Perform search

https://www.algolia.com/doc/api-reference/api-methods/search/

Many sub-actions available within these to improve your experience with Algolia. I recommend you to go through the docs fully.

  • Yes, there are few other ways available to work with algolia, like using cloud functions for indexing data into algolia and doing only search from your client. But as you specifically mentioned SWIFT the above references would help you to get started!

Upvotes: 2

Related Questions