Syncing Firebase 'ref' Field with Typesense
TLDR Guillermo wanted to index a 'ref' field from firebase with typesense. Jason provided a solution which involved syncing ref.path
as an addition to the existing fields. Guillermo confirmed the solution worked.



Jun 29, 2022 (15 months ago)
Guillermo
01:48 PMJason
01:51 PMref
is an internal firebase field right?Jason
01:52 PMJason
01:53 PMref
isn't returned by Firestore there, then the extension won't be able to sync itGuillermo
02:02 PMelse if (value instanceof admin.firestore.DocumentReference) {
return null;
}
Jason
02:03 PMJason
02:03 PMvalue
from the else
blockJason
02:08 PMGuillermo
02:11 PMGuillermo
02:11 PMJason
02:13 PMJason
02:13 PMelse if ((typeof value === "object" && value !== null) || value instanceof admin.firestore.DocumentReference)
Guillermo
02:17 PMpath
that returns a string with the path inside the DB, maybe we could work with thatJason
02:18 PMref.path
as a field into Typesense?Guillermo
02:19 PMGuillermo
02:49 PM
Jul 05, 2022 (14 months ago)
Jason
06:45 PMI think I misunderstood that you were going to do a PR for it... I'll take take a look later today and get back to you.
Guillermo
06:52 PMJason
06:53 PMJason
06:53 PMJul 06, 2022 (14 months ago)
Guillermo
01:55 PMJason
01:56 PM
Guillermo
03:48 PMnpm run emulator
gives me
error: unknown option '--test-params'
Guillermo
03:52 PMJason
04:06 PMfirebase --open-sesame extdev
first, and then try running the emulator?Guillermo
04:25 PMext:dev:emulators:start is no longer supported. Instead, navigate to a Firebase project directory and add this extension to the extensions manifest by running:
firebase ext:install
Guillermo
04:26 PMi extensions: ensuring required API <http://firebaseextensions.googleapis.com|firebaseextensions.googleapis.com> is enabled...
Error: HTTP Error: 403, Permission denied to get service [<http://firebaseextensions.googleapis.com|firebaseextensions.googleapis.com>]
Jason
04:37 PMGuillermo
05:27 PMJul 07, 2022 (14 months ago)
Jason
02:38 AM
Guillermo
01:35 PMGuillermo
01:35 PMJason
02:15 PMref.path
Jason
02:15 PMGuillermo
02:19 PMGuillermo
02:22 PMGuillermo
02:22 PMGuillermo
02:24 PMJul 12, 2022 (14 months ago)
Jason
03:38 AMref
key in the Firestore doc? I'm trying to replicate this on my Firestore collectionTypesense
Indexed 2764 threads (79% resolved)
Similar Threads
Setup and Issues in Connecting Typesense Instance with Firebase Emulator
Michael.M seeks help on connecting a local Typesense instance to the Firebase local emulator. Jason suggests looking at emulator commands and creating a specific file. After various attempts and troubleshooting steps, Michael.M is able to establish the connection.



Troubleshooting 400 Error When Upgrading Typesense Firestore Extension
Orion experienced a `400` error after updating the Typesense Firestore extension, causing issues with cloud functions. They traced the issue back to a data type conflict in their Typesense collection schema after updating. With help from Jason and Kishore Nallan, they resolved the issue by recreating the collection.



Troubleshooting 409 Errors with Firestore to Typesense Cloud Function
Orion encounters 409 errors with `ext-firestore-typesense-search-indexToTypesenseOnFirestoreWrite` cloud function. Jason suggests possible solutions like querying Firestore on each change or tracking sync state in a collection. Both agreed on adding a config option. Orion proposed contributing a PR for the change.



Firestore to Typesense Backfill Issue with Dynamic Paths
Greg experienced issues with Firestore to Typesense backfill not working, and Jason determined it might be related to dynamic paths in Firestore collections not being supported. An RC version of the extension with dynamic path support was considered but needs further review before being shared with Greg.

Resolving Issues with Firebase Extension and Typesense Configuration
Ernie sought clarification on how to handle the Firebase Extension and typesense collection configuration issues. Jason explained how to correctly specify the path and refresh the page to see updated data. After applying the advice given, Ernie successfully saw the changes.

