<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div>
<meta content="text/html; charset=utf-8" data-ogsc="" style="">
</div>
<p data-ogsc="" style="">Hi!</p>
<p data-ogsc="" style="">I am working on the issue <a href="https://github.com/osm-search/Nominatim/issues/1683" data-ogsc="" style="">
#1683</a>(Update script for running updates on a database with multiple countries).
<a href="https://gist.github.com/krahulreddy/8d08a8b2a77581810effa88d1641a571" data-ogsc="" style="">
This</a> is a modified script I used. This worked for me. But there are a few issues.</p>
<p data-ogsc="" style="">1) The sequenceNumber in import_status might not be the same for all the counties. Unless this is fied, there might be data loss during updates. This could be fixed by changing the structure of the import_status table to allow country
specific entries.(Is it a good idea?)</p>
<p data-ogsc="" style="">2) In Setup.php, init-updates option gets the latest date from the lib function getDatabaseDate(), which returns date corresponding to the object that has the highest osm_id. This would be wrong if the latest changes include deletions.
I think comparing lastimportdate in import_status with the previous approach could be a good thing. This will help avoid repeated updates on deleted nodes.</p>
<p data-ogsc="" style="">I also wrote a shell script to setup db with multiple countries, which can be found
<a href="https://gist.github.com/krahulreddy/948679bae414b5bfbdbe5fe489126eea" data-ogsc="" style="">
here</a>.</p>
<p data-ogsc="" style="">An alternate approach for setting up updates for multiple countries would be to modify the Replication URL constant. This could be done by editing the existing utils/update.php, or by maintaining a separate copy of utils/update.php
with necessary modifications.<br>
</p>
<p data-ogsc="" style=""><br>
</p>
<p data-ogsc="" style="">Is there any way of addressing these issues?</p>
<p data-ogsc="" style=""><br>
</p>
<p data-ogsc="" style="">Regards,</p>
<p data-ogsc="" style="">Rahul<br>
</p>
<p data-ogsc="" style=""><br>
</p>
<div id="ms-outlook-mobile-signature">
<div><br>
</div>
</div>
</body>
</html>