Search code examples
google-cloud-firestorealgoliafirebase-extensions

How to configure the right collection path for Algolia?


I have collection in firestore and i want add Firebase's Search with Algolia Extension.

Here screenshot for collection

What is the right path for indexing all announcements with subcollections here? this field


Solution

  • From looking at the code for the Collection Path field it seems that you can specify a path to any collection. Since your announcements are in a top-level collection, the value would be announcements.

    If you want to target a subcollection, that'd be three path segments, e.g. announcements/announcements/list. The second announcements in there is the ID of the document whose list subcollection to synchronize to Algolia.