Issue with forward geocoding in Algolia Places

Hello,

I’ve a quite big issue on some address. Here is one of my example requests:

GET https://places-dsn.algolia.net/1/places/query?query=Route%20de%20Carnon%20PEROLS%2034470%2C%20France&language=en
X-Algolia-Application-Id: [MY APP ID]
X-Algolia-Api-Key: [MY API KEY]

The address I try to forward-geocode is Route de Carnon PEROLS 34470, France ; and the result of Algolia Places is a Brazilian address with a loooooooooooot of _tags, postcode, suburb and locale_names.

So, my first issue is than the address is not well geocoded, and my second issue is than it is generating on my infrastructure a 51 000+ characters long address :scream:.

{
  "hits": [
    {
      "country": "Brazil",
      "is_country": false,
      "city": [
        "Manaus"
      ],
      "is_highway": true,
      "importance": 26,
      "_tags": [
        "highway",
        "highway/residential",
        "country/br",
        "address",
        "highway/tertiary",
        "highway/secondary",
        "highway/unclassified",
        "highway/pedestrian",
        "highway/service",
        "highway/track",
        "highway/living_street",
        "highway/primary",
        "highway/secondary_link",
        "highway/footway",
        "highway/tertiary_link",
        "source/osm"
      ],
      "postcode": [
        "69000-000",
        "69095-550",
        "69900-000",
        "69015-483",
        "69015-510",
        "69093-843",
        "69015-645",
        "69095-560",
        "69093-108",
        "69097-276",
        "69015-465",
        "69095-500",
        "69059-160",
        "69018-454",
        "69095-580",
        "69015-500",
        "69015-512",
        "69015-498",
        "69059-804",
        "69093-803",
        "69015-590",
        "69095-542",
        "69015-660",
        "69017-278",
        "69059-418",
        "69097-235",
        "69015-503",
        "69017-218",
        "69015-463",
        "69093-805",
        "69059-815",
        "69059-424",
        "69015-485",
        "69093-187",
        "69093-822",
        "69093-102",
        "69059-212",
        "69092-275",
        "69015-663",
        "69017-145",
        "69093-186",
        "69095-510",
        "69017-230",
        "69015-630",
        "69015-505",
        "69092-290",
        "69059-592",
        "69015-647",
        "69093-149",
        "69093-789",
        "69015-707",
        "69017-173",
        "69093-172",
        "69059-390",
        "69088-058",
        "69095-535",
        "69097-314",
        "69095-545",
        "69095-570",
        "69092-280",
        "69093-790",
        "69092-380",
        "69059-292",
        "69025-522",
        "69059-501",
        "69095-520",
        "69015-593",
        "69017-183",
        "69059-183",
        "69095-590",
        "69059-210",
        "69015-623",
        "69059-807",
        "9037-774",
        "69059-142",
        "69059-198",
        "69093-802",
        "69015-720",
        "69017-300",
        "69059-627",
        "69017-155",
        "69097-341",
        "69092-270",
        "69015-710",
        "69093-753",
        "69015-565",
        "69059-810",
        "69059-518",
        "69015-504",
        "69095-530",
        "69017-310",
        "69015-280",
        "69097-498",
        "69017-285",
        "69015-285",
        "69059-380",
        "69059-594",
        "69093-074",
        "69017-263",
        "69015-715",
        "69093-176",
        "69095-532",
        "69097-468",
        "69093-174",
        "69092-285",
        "69093-795",
        "69015-499",
        "69033-510",
        "69093-813",
        "69059-185",
        "69059-205",
        "69015-685",
        "69097-467",
        "69059-520",
        "69059-462",
        "69093-839",
        "69059-421",
        "69092-390",
        "69015-683",
        "69059-420",
        "69093-089",
        "69092-305",
        "69095-525",
        "69093-797",
        "69018-451",
        "69059-191",
        "69059-830",
        "69015-666",
        "69059-240",
        "69059-168",
        "69023-010"
      ],
      "county": [
        "Microrregião de Manaus"
      ],
      "population": 1982179,
      "country_code": "br",
      "is_city": false,
      "is_popular": false,
      "administrative": [
        "Amazonas",
        "Mesorregião Centro Amazonense"
      ],
      "admin_level": 15,
      "suburb": [
        "Tarumã",
        "Zona Franca de Manaus",
        "Morro da Liberdade",
        "Betânia",
        "Tancredo Neves",
        "Centro",
        "Gilberto Mestrinho",
        "Alvorada",
        "Cidade Nova",
        "Coroado",
        "Japiim",
        "Petrópolis",
        "Dom Pedro I",
        "Novo Aleixo",
        "São José Operário",
        "Nova Cidade",
        "Aleixo",
        "Flores",
        "Redenção",
        "Raiz",
        "Parque Dez de Novembro",
        "Lírio do Vale",
        "Armando Mendes",
        "São Lázaro",
        "Colonia Terra Nova",
        "Presidente Vargas",
        "Da Paz",
        "Crespo",
        "Cidade de Deus",
        "Nossa Senhora das Graças",
        "Compensa",
        "Chapada",
        "Planalto",
        "Colônia Oliveira Machado",
        "Santo Agostinho",
        "Lago Azul",
        "Mauazinho",
        "Cachoeirinha",
        "Santo Antonio",
        "Vila da Prata",
        "São Jorge",
        "Santa Etelvina",
        "São Francisco",
        "Adrianópolis",
        "Nova Esperança",
        "Vila Buriti",
        "Distrito Industrial I",
        "Santa Lúzia",
        "Educandos",
        "Ponta Negra",
        "Aparecida",
        "São Geraldo",
        "Tarumã-Açú",
        "Zumbi dos Palmares",
        "São Raimundo",
        "Glória"
      ],
      "village": [
        "Manaus",
        "Monte das Oliveiras"
      ],
      "is_suburb": false,
      "locale_names": [
        "Rua Perimetral Duque de Caxias",
        "Avenida Perimetral Duque de Caxias",
        "Rua Abobeira",
        "Rua e",
        "Rua Santa Rosa",
        "Rua Esperança",
        "Rua São Benedito",
        "Rua Dona Mimi",
        "Avenida Igarapé de Manaus",
        "Rua dos Açaizeiros",
        "Rua Perimetral",
        "Travessa da Independência",
        "Rua 3; Rua Três",
        "Rua Souza Mendes",
        "Beco São Francisco",
        "Rua Espinosa",
        "Avenida Irianeópolis",
        "Avenida G",
        "Rua da Paz",
        "Rua Paz",
        "Rua das Bacabeiras",
        "Rua 1; Rua Um",
        "Rua São José",
        "Rua 1",
        "Rua Uno",
        "Rua Tupiá",
        "Rua H",
        "Beco São Sebastião",
        "Beco Nova Esperança",
        "Rua Ibiporã",
        "Rua 6; Rua Seis",
        "Rua São Pedro",
        "Rua Maria das Dores de Lima",
        "Rua M",
        "Rua Jaiarama",
        "Rua 15 de Novembro; Rua Quinze de Novembro",
        "Rua Serro",
        "Rua Cinco; Rua 5",
        "Rua Professor Abílio Alencar",
        "Rua Quatro; Rua 4",
        "Rua Souza Campos",
        "Rua 2; Rua Dois",
        "Rua Senador Fábio Lucena",
        "Rua Natal",
        "Travessa Antonil",
        "Rua Dois; Rua 2",
        "Avenida Mirra",
        "Travessa Acaico",
        "Avenida do Futuro",
        "Rua Goiania",
        "Avenida das Flores",
        "Rua Nova",
        "Rua Alfredo Bessa",
        "Rua Rio Ebro",
        "Rua 5; Rua Cinco",
        "Avenida Tancredo Neves",
        "Rua São João do Paraíso",
        "Rua 33; Rua Trinta e Trés",
        "Rua B",
        "Rua Bom Jesus",
        "Rua Dea Alencar",
        "Rua Rio Jararate",
        "Rua Sete; Rua 7",
        "Rua Tangará",
        "Rua 16; Rua Dezsseis",
        "Rua Sabiá",
        "Travessa Bela Vista",
        "Rua Getúlio Vargas",
        "Rua João Thomé Craveiro",
        "Rua 9; Rua Nove",
        "Rua Tucanos",
        "Rua Fragata",
        "Rua Um; Rua 1",
        "Rua Júlio Cortazar",
        "Rua 21; Rua Vinte e Um",
        "Rua Maria da Glória Santos",
        "Rua A",
        "Rua Juan Arduino",
        "Rua Principal;Avenida Principal",
        "Rua Domingos Leite",
        "Rua Henoch Reis",
        "Beco Boa Esperança",
        "Rua Jandiatuba",
        "Travessa Vinte e Sete; Travessa 27",
        "Travessa Araribá",
        "Rua 17; Rua Dezessete",
        "Rua Acre",
        "Beco São Miguel",
        "Rua Pitangueiras",
        "Rua Ceará",
        "Rua São Mateus",
        "Avenida Noel Nutels",
…

And it continue like that over more than 2000 lines :scream:.

Thank you very much for your help on that.
Arnaud.

Hi @Alefort, We receive our data from Open Street Map. Indeed, there are times when their data can be improved. If you would like to add locations or fix data to Open Street Map, you are welcome to submit data:

https://wiki.openstreetmap.org/wiki/Beginners’_guide

We do a new import of planetary data every quarter, at which point the improvements will be in the Algolia Places data. Doing so, you are not only assisting Places, but the greater community with better map data.

Hello, thank you for the answer.

Actually, I don’t think there is a data issue on OpenStreetMap. When I search specifically this address, OSM Nomitim don’t find anything because it consider than the street is not inside the city of Perols, but on a close city; when I search the street without the city name everything is ok. This is a very good behaviour.

Algolia Places don’t do that. Algolia Places has 2 issues:

  1. It return me a place in Brazil (Even if my address includes a Postcode, a country name, and a city name which is not Brazil and none of theses info have anything in common with the place returned in Brazil).
  2. The place found in Brazil has a extraordinary 51000+ characters long “locale_names”, which is probably also an issue. It seem to match half of the streets of the region.

And for me, this is a very bad behaviour: I’ve a completely wrong result not at all related to my query, and with some information which I consider malformed (way too long). I don’t see how I can fix this issue with OSM.

Thank you very much,
Arnaud.

Hi there,

Thanks for reaching out.

I checked the address you provided on GoogleMaps and it is transformed into “Avenue George Frêche, Perols, 34470”. It seems that this address does not exist, or has been superseded by a new name. Like Google, we do not support deprecated names of locations.

That being said, the record you got as a result is definitely a bug in our processing pipeline and I will investigate what happened exactly (the current suspect is overzealous and incorrect tagging in OSM causing an aggressive deduplication and merging in our pipeline).

Depending on your use case, it could make sense to restrict the addresses to a single country, like France. This will drastically improve the responsiveness of Places as well as increase relevancy as we can potentially leverage optimisations specifically tailored for that country.

You can restrict the country field in a similar way to what is done in this example: https://community.algolia.com/places/examples.html#searching-in-a-country

Best,