Fireship · @fireship
Algolia Firestore Instant Search
Uploaded May 31, 2018 · Length 9:53
Summary
build instant search features with algolia and firestore using cloud functions and angular
- algolia
- firestore
- instant search
- cloud functions
- angular
Transcript preview
The first 2 minutes of the transcript. Select a timestamp to watch that moment on YouTube.
- 0:00
[Music]
- 0:01
one of the most powerful integrations
- 0:04
you can make with fire store is algo
- 0:06
Leah it converts your fire store
- 0:07
database into a full-text search engine
- 0:09
which means that you can build instant
- 0:11
search features that are extremely fast
- 0:13
and sophisticated in this episode I'm
- 0:15
going to show you how to automatically
- 0:17
index all of your data in fire store
- 0:19
using cloud functions and then we'll
- 0:21
build an instant search feature on the
- 0:22
front end using angular 6 if you're new
- 0:24
here make sure to LIKE and subscribe and
- 0:26
you can grab the full source code from
- 0:28
angular firebase com if you've been
- 0:30
following the channel for a while you
- 0:31
might remember episode 27 where we
- 0:34
created an algo leah feature with the
- 0:35
real time database but a lot has changed
- 0:37
since then we now have fire store cloud
- 0:40
functions 1.0 angular 6 and algo leah
- 0:43
also released their own angular instant
- 0:45
search component library and I think
- 0:48
this is a really important topic because
- 0:49
I end up using algo leah and a lot of
- 0:51
projects that I work on it provides a
- 0:53
great developer experience and also a
- 0:55
great user experience for surge what
- 0:57
we're building today is just a simple
- 0:59
full-text search feature but it will set
- 1:01
you up to index your data in algo Leah
- 1:03
so you can build more complex features
- 1:04
on top of it every time we save a
- 1:07
document to the fire store database it
- 1:09
will trigger a cloud function that will
- 1:11
then transmit that data over to algo
- 1:13
Leah so it can be indexed on their
- 1:14
servers once it's indexed you can then
- 1:17
query it using one of their client-side
- 1:18
API s in this case we're using angular
- 1:20
but you could also use iOS react or
- 1:23
whatever you want to get started you'll
- 1:26
need to sign up for a now goli account
- 1:27
and they do have a free tier that's
- 1:29
pretty generous and we'll also choose a
- 1:31
data center I'm just going with one in
- 1:32
the u.s. that has the lowest latency
- 1:35
after you sign up head over to the
- 1:37
indices tab and then we'll create our
- 1:39
first index you can think of an index is
- 1:42
just a collection that you want to
- 1:44
search across in our case it'll be a
- 1:46
single firestore collection but you
- 1:48
could even combine multiple sub
- 1:49
collections into a single index to
- 1:51
search across all of your sub
- 1:53
collections throughout your fire store
- 1:54
database now that we have our index
- 1:56
created we need to add some data to it
- 1:58
with a firebase cloud function but first


