Select to view content in your preferred language

Rebuilding Locators need to set the parameters each time.

64
3
13 hours ago
Status: Open
Labels (1)
StevenFama
Regular Contributor

Everytime we rebuild a locator we now need open the configuration tab and click on Geocode Addresses and Find Address Candidates.

StevenFama_0-1784722554670.png

StevenFama_1-1784722577982.png

 

 

3 Comments
Brian_McLeer

@StevenFama this has been a pain point for me for years, but I don't think there is a way manually. I think your best route is to script the rebuild which remembers the settings. I posted a generalized script that I use to rebuild my composite locator on a weekly basis at the link below if it helps. 

https://github.com/brianmcleer/Python/tree/main/arcgis-locator-rebuilder

MikeVolz

Are you deleting the existing address locator and recreating it each time or are you using the Rebuild Address Locator geoprocessing tool from the Geocoding Tools toolbox?

Brian_McLeer

Using the Rebuild Address Locator GP tool (arcpy.geocoding.RebuildAddressLocator), not delete-and-recreate. The .loc files stay put and just get reindexed.

Since a running geocoding service holds file locks on the .loc, the script stops the service first, rebuilds, then starts it back up. Per composite:

  1. Check the service's realTimeState through the Admin REST API
  2. If it's STARTED, stop it to release the locks
  3. Rebuild the participating locators first
  4. Rebuild the composite last (otherwise it indexes stale participant data)
  5. Refresh the token and restart the service