Is there a way to break `emplace` into 2 types `...
# community-help
r
Is there a way to break
emplace
into 2 types
emplace-create
and
emplace-update
? see diagram below. For example, let's say you have a process to gather addresses and it defaults the location / geopoint to [0,0] Another process geocodes the addresses. This is efficient because we search for location of [0,0] and replace it with the real geopoint for the address. But the next gather function will overwrite the location with [0,0] We do not want to live the location key out of the array because we would have to EXPORT the entire database and look for missing location keys. Is there a better way? I think if we could emplace-create with the location key and then emplace-update without the location key then it would be more efficient and keep the geocoded locations. Simple picture:
Copy code
emplace-create:    send:{location:[0.0], a:1}
emplace-update:{a:1}
remove the location because we never want to update it to [0,0]