#community-help

Integrating Typesense with Algolia's Autocomplete-JS Library

TLDR Metahub asks about integrating Typesense with Algolia's autocomplete-js UI library. Jason suggests using the getSources parameter and the Typesense JS client.

Powered by Struct AI

2

3
30mo
Solved
Join the chat
May 19, 2021 (30 months ago)
Metahub
Photo of md5-7d2796ababc14477f4c09abc2e8edb05
Metahub
11:03 PM
Hi, what's the recommended approach for integrating Typesense with Algolia's new standalone autocomplete-js UI library (https://github.com/algolia/autocomplete)? Can the existing Typesense Adapter for InstantSearch.js be used for that also, or not really?
May 20, 2021 (30 months ago)
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
12:34 AM
Hi Metahub you want to hook into getSources parameter of autocomplete, and use the Typesense JS client to make a search request: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#using-asynchronous-sources

1

Metahub
Photo of md5-7d2796ababc14477f4c09abc2e8edb05
Metahub
02:59 AM
Perfect. Thanks, Jason!

1