Apoc.spatial.geocode is not working in Neo4j Desktop

Hello All,

I have installed APOC plugin in Neo4j Desktop. but even the example query is not working in Desktop. it is working fine in sandbox.

Please provide the following information if you ran into a more serious issue:

  • neo4j version, desktop version, browser version
    neo4j version : 4.3.1 desktop
APOC version 4.3.0.1
  • which plugins / extensions / procedures do you use
    APOC

  • neo4j.log and debug.log

Hi @pkmittal28 ,

I just tried the example on a fresh install, and you're right I get no results for that input. However, the plugin does seem to work if I try other inputs:

CALL apoc.spatial.geocodeOnce('London')

Perhaps sandbox is configured to use a different data source for resolving geocodes.

-ABK

Comparing Desktop to Sandbox, using the same version of Neo4j and APOC, I get different results for the original query, just as you mentioned.

Why the difference? I'm unsure.

  • versions appear to be the same
  • configuration appears to be the same (using call apoc.config.list to check)
  • what is different?

Some differences which occurs to me is the location of the DBMS instance and whether machine localization impacts the query. FWIW I'm running Desktop on a Mac in Sweden. The sandbox machine is in running on Amazon at us-east-1 on a AWS_ECS_FARGATE. Should/could that affect the results? Seems unlikely.

Perhaps @craig.taverner has some insight?

-ABK

Since apoc.geocode defer the actual geocoding to various other services, I assume it is possible for those services to react differently based on the geographic source of the query, but that would certainly surprise me. More likely, I suspect, is that they are configured differently. If I remember correctly, the original version had a separate config system from the rest of apoc. Is there a chance that is still true, and apoc.config.list does not reflect the geocode config? I've not looked at this code in a while, but would assume, as you did, that apoc.config.list did cover geocode.

The documentation certainly seems to indicate that the geocode configuration is part of normal apoc configuration: Spatial - APOC Extended Documentation

What were the values of these fields in the two cases? Were they the defaults (osm)?

Looking at Neo4j 4.3.2 in a fresh sandbox and a fresh Neo4j Desktop DBMS with APOC installed, I checked the config using:

call apoc.config.list() yield key, value
WHERE key starts with "apoc"
RETURN key, value

On both platforms, I do not see any entries for apoc.spatial.*. I assume that means they are using the default settings.

The only difference I see is that RETURN apoc.version() is barely different:

  • Sandbox: 4.3.0.0
  • Desktop: 4.3.0.1

The diff for 4.3.0.1 would not seem to affect spatial. Comparing 4.3.0.1...4.3 · neo4j-contrib/neo4j-apoc-procedures · GitHub

For the OP @pkmittal28 , there is clearly some difference in the two deployments. We're unfortunately not able to figure out what is different. It isn't possible to manage plugin configuration on Aura. Since these call out to external services, I would suggest not relying on the results being the same; these are not index look-ups.

Best,
ABK