Geo Spatcial query return Eval Query -1 Error

OK, thanks to @dlbis post Cannot get geof:distance calculated - #15 by dlbis I have figure it out how to reproduce.

Create a table in a relational database (CSV may work) with 3 columns

  • name
  • long
  • lat

Create a SMS2 definition to load the data into a database. Then run query and voila Query Eval -1.

As mentioned I got the idea from @dlbis. If I export and import the data (which should be the same) in a different database (on the same installation) the query will work. So this confirm that the spatial index do not get setup properly when loaded with a specific syntax .