[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension does not propogate updates to corresponding Algolia record when setting the value of a property equal to null #102

Closed
andrewbeeksma opened this issue Mar 30, 2022 · 2 comments

Comments

@andrewbeeksma
Copy link

Docs say this: "Anytime you update a document, the extension propagates the update to the corresponding Algolia record. If you delete a document, the extension removes the corresponding Algolia record."

I'm finding that when I update a firestore document property value, the extension correctly updates the corresponding Algolia record. However, if I update a firestore document value by setting that property value equal to null, this update is not propogated to the corresponding Algolia record. Could somebody else test this and confirm? Can't seem to pinpoint the disconnect between my firestore database and corresponding algolia index.

@smomin
Copy link
Collaborator
smomin commented Apr 4, 2022

Hey @andrewbeeksma, the code is set up to handle fields the are removed and not fields that are set to null. Is there a reason for this usecase?

@andrewbeeksma
Copy link
Author

@smomin Yeah, I realized it was more of a feature and not necessarily an issue/bug with the codebase. Ended up removing the extension and handling updates internally, so no need for any changes. Our personal use-case involved products; products that went off sale were not updated in the algolia index because that null value was not captured. In hind-sight, we could have restructured our code around setting the sale_price to 0 rather than null, but what's done is done haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants