algolia / firestore-algolia-search

Apache License 2.0
112 stars 35 forks source link

Firestore DocumentReference path in Algolia Object #72

Closed iansmathew closed 3 years ago

iansmathew commented 3 years ago

It would be wonderful to have a configuration option in the extension setup to allow passing the document reference path of the firestore document to the transform functions and algolia index. Perhaps as a key called firestore_path

This would allow users to use Algolia to search for documents across collections and then return the actual Firestore document on the front end.

Currently the only linking between Firestore Documents and Algolia Objects are the object ID (AKA Doc ID). This isn't enough on its own to link back to the original document. A full path of the document would allow for this to happen.

luigi-agosti commented 3 years ago

Good idea, this could be useful... maybe more generically could be to pass reference in the transform and let users of the extension decide what to do. Thanks

smomin commented 3 years ago

Thanks for the PR. I will have an update PR for this issue.