algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

Path overwriting firestore field #140

Closed Mawizzler closed 1 year ago

Mawizzler commented 2 years ago

Is it possible to opt out of the creation of the path field because my collection contains a field called path and currently gets overwritten by the script with the firestore document path?

smomin commented 2 years ago

no, the path field is required. but just in case, can you provide visual for me to review.

Mawizzler commented 2 years ago

My document has a field called 'path' and I can't even use a transform function to change it before sending it to algolia because it gets overwritten with the collection path by the extension. Any ideas on how I could fix this?

CleanShot 2022-11-08 at 10 42 37@2x

CleanShot 2022-11-08 at 10 44 32@2x
smomin commented 2 years ago

Based on the code, you should be able to change the path field in the Transform function. The entire payload is sent to the Transform function and the result is what gets used in Algolia. Can you provide details on the Transform function?