Hello again, If I'm monitoring a firebase collect...
# random
d
Hello again, If I'm monitoring a firebase collection using the Typesense extension, is it possible to transform that data at all before it is indexed to Typesense? I want to add some more data to each record so I can filter on those values. The values I want to add to each record are also the two fields in my
Firestore Collection Path
-
pathOne/{thisValue}/pathTwo/{andThisValue}/pathThree
- if I can't add them to a record using a firebase cloud function, can I filter on these values any other way? Thanks ๐Ÿ™
j
This is not possible unfortunately. So you would have to fork the extension and run your own version of the cloud function provided by the extension
๐Ÿ‘ 1
d
Okay, unless there is some other configuration for filtering our data that we should explore, we may have to pursue this option.. Would it require publishing the forked version of the extension to the firebase extension marketplace? And has it been done before?
j
You donโ€™t have to publish it. Youโ€™d essentially take the code in this file and paste it inside a Google Cloud function inside your own project.
โœ… 1
And has it been done before?
Yup, this is not an uncommon scenario.
๐Ÿ‘ 1
d
We've done this and everything has gone smoothly so far. But does this also require a custom
backfill
function? When backfilling data, we don't get any errors in the console, but the function runs and never enters the batching loops to write to typesense
Nvm, think I answered my own question.. We need to modify
typesenseDocumentFromSnapshot
so the changes apply to both writing and backfilling..
๐Ÿ‘ 1