Comments (7)
@Haroenv The partialUpdate was used to manage race conditions that could occur from the cold start up of the Cloud functions. Before this approach, I had an extra call to the Firestore db to sync up the records after then Cloud Function was warmed up, but this would be a Firestore cost.
I am currently considering looping through the payload for null values. If I encounter any fields with null values, i will use the saveObject method. However, I will have to make a call to Firestore db to refresh the data just in case if the data has changed.
from firestore-algolia-search.
Currently this is not possible with the approach I have taken. I am thinking through an approach that will clean up null attributes. Will update when I have a solution.
from firestore-algolia-search.
How often are you setting attributes to null? Can you send me examples so I can see if there are alternative solutions I can think through?
from firestore-algolia-search.
The attributes aren't set to null very often. Example: a document may have an attribute that was mistakenly given a value (by a user), so it is later corrected to null.
from firestore-algolia-search.
https://discourse.algolia.com/t/deleting-attributes-in-partial-updates/10154 I think we might be better off updating the objects altogether instead of partially updating. It doesn't have a difference in cost and will solve this issue. Deleting objects alltogether isn't solved by just swapping partialUpdate to save though
from firestore-algolia-search.
this issue is a duplicate of #60
from firestore-algolia-search.
@Haroenv The partialUpdate was used to manage race conditions that could occur from the cold start up of the Cloud functions. Before this approach, I had an extra call to the Firestore db to sync up the records after then Cloud Function was warmed up, but this would be a Firestore cost.
I am currently considering looping through the payload for null values. If I encounter any fields with null values, i will use the saveObject method. However, I will have to make a call to Firestore db to refresh the data just in case if the data has changed.
Ok but what if someone uses firebase.firestore.FieldValue.delete() to remove the field?
from firestore-algolia-search.
Related Issues (20)
- Subcollections fail the initial sync HOT 10
- Feature Request: disable debug logging (via configurable param?) HOT 1
- Error when installing algolia: "You may not have more than 32 total max instances in your project" HOT 1
- select firestore database HOT 8
- Bad performance backfilling large Firestore collections HOT 6
- Updated to mac Sonoma: issue with functions watching wrong directory HOT 3
- Allow for [ObjectId] Modification HOT 13
- Indexing large documents HOT 1
- Firestore "Extension" and >1 Collection HOT 3
- Firestore document changes not reflected in algolia index HOT 6
- Add correct guide example while doing configuration (Feature Request). HOT 1
- Node 16 deprecation HOT 2
- Prematurely Exiting Full Indexing HOT 4
- This extension overwrites the firestore objectID if one is manually set. HOT 2
- FirebaseFunctionsError: The principal lacks IAM permission "cloudtasks.tasks.create" HOT 2
- What's the right authentication setup for a transform Cloud Function endpoint? HOT 2
- multi-environment configuration (secrets) HOT 2
- Error trying to run fullIndex on > 250 documents HOT 28
- Firebase Transform Function not removing unwanted key from a field object HOT 2
- Extension cloud function to use transaction HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from firestore-algolia-search.