algolia / firestore-algolia-search

Apache License 2.0
108 stars 33 forks source link

This extension overwrites the firestore objectID if one is manually set. #191

Open ryankashi opened 6 months ago

ryankashi commented 6 months ago

Hi!

I'd like to create a custom objectID that is separate from the name of the document inside of my firestore database. However, if I set a document to firestore via setDoc(my_collection/my_document_name, {objectID: 'my_object_id'})

Algolia will instead overwrite my objectID and replace it with my_document_name. However, this is not desired behavior as I would like to manually save the objectID inside of my Firestore Database instead, while being able to control my document name as desired.

This is important for subcollections that may have similar document names across subcollections, but should be indexed separately based on their objectID.

Thanks!

smomin commented 4 months ago

I have a RC version of the extension that allows admins to change the objectID in the configuration, please try it out. https://console.firebase.google.com/project/_/extensions/install?ref=algolia/firestore-algolia-search@1.2.1-rc.0

smomin commented 4 months ago

any feedback?