code: def structure_results(res):
      
      out = {'hits': {'hits': []}}
      keys = [u'admin1_code', u'admin2_code', u'admin3_code', u'admin4_code',
              u'alternativenames', u'asciiname', u'cc2', u'coordinates',
              u'country_code2', u'country_code3', u'dem', u'elevation',
              u'feature_class', u'feature_code', u'geonameid',
              u'modification_date', u'name', u'population', u'timezone']
      for i in res:
          i_out = {}
          for k in keys:
              i_out[k] = i[k]
          out['hits']['hits'].append(i_out)
      return out
docs: Format Elasticsearch result as Python dictionary