Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
397 views
in Technique[技术] by (71.8m points)

firebase - 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.

question from:https://stackoverflow.com/questions/66056851/how-to-push-firestore-data-to-algolia-swift

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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!

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...