Closed pfitzpaddy closed 4 years ago
Updating site_id
to string
db.getCollection('adminsites').find({ admin0pcode:'ET' }).forEach(function(d){
d.site_id = d.site_id.toString()
db.getCollection('adminsites').save(d)
})
Make indexes on getAdminSites
db.getCollection('adminsites').createIndex({ admin0pcode: 1 });
db.getCollection('adminsites').createIndex({ admin0pcode: 1, admin1pcode: 1 });
db.getCollection('adminsites').createIndex({ admin0pcode: 1, admin1pcode: 1, admin2pcode: 1 });
db.getCollection('adminsites').createIndex({ admin0pcode: 1, admin1pcode: 1, admin2pcode: 1 , admin3pcode: 1 });
db.getCollection('adminsites').createIndex({ admin0pcode: 1, admin1pcode: 1, admin2pcode: 1 , admin3pcode: 1, admin4pcode: 1 });
db.getCollection('adminsites').createIndex({ admin0pcode: 1, admin1pcode: 1, admin2pcode: 1 , admin3pcode: 1, admin4pcode: 1, admin5pcode: 1 });
Adding a location is now updated to fresh new look, also fixing errors
Adding indexes for all admin levels
db.getCollection('admin1').createIndex({ admin0pcode: 1 });
db.getCollection('admin2').createIndex({ admin0pcode: 1 });
db.getCollection('admin3').createIndex({ admin0pcode: 1 });
db.getCollection('admin4').createIndex({ admin0pcode: 1 });
db.getCollection('admin5').createIndex({ admin0pcode: 1 });
Errors in cascading locations – For example if we enter data for 3 “Woreda” in Oromia region, Reporthub automatically puts Oromia for a Woreda in Somali region.