maps icon indicating copy to clipboard operation
maps copied to clipboard

add a re-scan contacts occ command

Open eleith opened this issue 4 years ago • 3 comments

very few of my contacts are able to produce good lookup results.

it would be easier to debug if i could kick off a vcard rescan immediately (instead of waiting for a cron job)

i see there are commands to re-scan photos and tracks, so this seems like an established pattern that would be nice to extend.

i might be interested in giving this a shot myself if someone can provide some guidance.

would the approach be to just clear the address_geo database and then trigger some initial carddav lookup function?

eleith avatar Oct 18 '20 15:10 eleith

This would be great. I believe it is not that hard to implement such a command - maybe the troops will invest some minutes in doing so. I could fiddle around with it a bit but I think it is done much faster and much cleaner if it is done by someone who knows the internals of nextcloud :-) THX in advance!

anthraxn8b avatar Jan 24 '21 18:01 anthraxn8b

Be aware that you have to respect some load limits at nominatim.

As I remember the address should be resolved instant, expect there was already a lookup in this second. So if you change addresses by hand, you should not run into this limit*. If your on a big instance or syncing multiple contacts this limit gets relevant.

*It might be that the contacts app saves the address while typing like typing "street" creates the addresses: "s", "st", ... , "street" and therefore the final address runs into this load-limit. I would prefer to somehow fix this behavior, or deal with this behavior and therefore resolve the source for the need of an extra commend.

One last sort I find the name re-scan contacts misleading. We never scan for contacts as we can directly ask the nextcloud server for contacts with addresses or geodata, therefore there is no need for rescanning them. So the only thing which is cached by the maps app are the addresses, which don't need to come from contacts. Therefore, If you think about adding this command I would prefer something like lookup-addresses.

@eneiluj any thoughts on this?

tacruc avatar Jan 25 '21 08:01 tacruc

Something like this would be particularly useful for cases like https://github.com/nextcloud/maps/issues/635.

nunesgh avatar Aug 13 '21 21:08 nunesgh