O'Reilly logo

Apache Solr Beginner's Guide by Alfredo Serafini

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action – creating a repository of cities

Our work is then very simple. We have a city name in our index, but we don't have its coordinates. We can check in the Nominatim Open Street Map API to obtain its coordinates if present, and some extra metadata. The procedure for this is as follows:

  1. I decided that you need not worry about retrieving that data, so I put a very simple Scala script called import_cities_osm.sh in the /SolrStarterBook/test/chp05/cities directory. The script will search for the list of cities in your running paintings core and then ask Nominatim if there are matches to it, importing them if present into a new core, which we will simply call cities. Obviously this will produce some extra noise, but it's good as we are ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required