firestore-typesense-search
firestore-typesense-search copied to clipboard
Feature request: configuration field to call a transform function
Hey team, I'm in the process of migrating from Algolia to typesense and all is going well, however, the Algolia extension allows us to provide the name of a another function that can transform our document data before writing it to the Algolia index.
This would be extremely useful to have available in the typesense extension. We use it to modify one of the ID's as we are indexing a subcollection that exists nested in multiple places e.g. programs/{programId}/program-users/{userId}. As the docs we are indexing are keyed by the userId we need to append the programId as a suffix to prevent records overwriting each other.
I believe something like a transform function would be useful for a bunch of other lodged issues where people want to exclude records with certain values from their typesense collection. Supporting a returned object like below would be extremely useful.
{ payload: { ... data to sync }, docId: 'someId', action: 'skip' // 'skip' | 'sync' | 'delete' }
This would allow us to have more control over what goes into our typesense collections.
Cheers
I'd definitely appreciate a PR for this