algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

Mutate and Create Fields When Sending to Algolia #31

Closed PeterCardenas closed 3 years ago

PeterCardenas commented 3 years ago

Hello! We currently have some cloud functions that mutates our Algolia indices when relevant documents are created, updated, or deleted, and we are excited to discover that this Firebase extension can help remove some of this code. However, one of our indices change one field to a more search-friendly form, i.e. turning a serialized JSON of rich text into plaintext. We would like to move all of our function code to using this extension, but this is currently blocking us from doing so. Thanks!

smomin commented 3 years ago

hey Peter, I want to better understand your use case. Are you looking to inject your logic to post process fields values before it is indexed into Algolia?

PeterCardenas commented 3 years ago

hi! thanks so much for getting back to me, that is indeed my use case.

smomin commented 3 years ago

I will have to do some R&D on how to call external functions.

smomin commented 3 years ago

hey @PeterCardenas, created a PR for the post processing.