Closed kshitijsubedi closed 3 years ago
No, you are not missing anything. The extension uses partialUpdate for creating and updating records. The method is used because of its ability to version records so it can be used to prevent race conditions. How often do you remove the fields?
@smomin Would you recommend deleting the document and re-inserting it into the Firestore database in cases where a field is deleted? I think it would help if this caveat could be noted in the documentation (please correct me if I missed it). This is a necessary feature for my app, so if it's possible, it would be a great benefit to include! Thank you for your work!
@smomin not often, but I have some fields on the index that are deleted on the firestore and don't want those on algolia. There are close to one hundred objects that have deleted fields. What can I do to remove those fields from algolia?
I am thinking through an approach that will clean up null attributes. Will update when I have a solution.
We should change
and
to saveObject
, as that will take deleted fields in account, replacing the whole object.
@kshitijsubedi I think i have a solution in mind, but I will need time to write the code. I will attach the PR to this issue once I have it ready.
I also need this behavior to be implemented 🙏
@smomin I'm curious why this was closed? This issue still remains.
This was automatically closed after the PR was merged to the main branch.
Here's what happening :
before deletion I tested by changing the field data and the changes are reflected on index. Just that the firestore field deletion part does not delete on algolia index. Am I missing something or is it an issue??