Closed deimantasa closed 3 years ago
Do you know that the existing function already works for sub-collections?
Just specify the full sub-collection path: rootCollection/{someDocId}/subCollection/{someDocId}
This will index only specific subCollection. My goal is to index all subCollections
with the same name (collectionGroup
).
Example:
collection
- users
subCollection
- cars
I want to listen for changes that happen in any subcollection of cars
(thus collectionGroup
) instead of single one as per your sample.
You can do this by setting the sub-collection path to : users/{parentId}/cars
. You will need to have two Algolia extensions installed. One to listen on the users
collection and the other to listen for the users/{parentId}/cars
subcollection.
reference #36
Wow - that's terrific. Just ran a test and indeed - it works!
Would be nice to add some description about it, as it was not clear in the beginning that sub-collections
are taken into account as well.
Thank you for prompt help!
@smomin
You will need to have two Algolia extensions installed. One to listen on the users collection and the other to listen for the users/{parentId}/cars subcollection.
Both points to the same algolia index or should be pointing to separate indexes?
Hello devs,
First of all - thank you for such an amazing and time saving tool. It really helps us to move much faster with Fire + Algolia.
One thing I found missing is support for collectionGroups. It would extremely help as currently, we've to have
global
collection
in order for it to sync with Algolia. However there are many instances as it's better to nest it under somecollection
instead of keeping everythingglobal
.As a workaround, we have subcollection and collection of the same thing. Collection is used for algolia only, and subcollection for other things. It would be great to rely on only
subcollection
in this case as it would take away this constant sync between mainsubcollection
andcollection
which is only used inAlgolia
.Looking forward!
Cheers