Is Coveo managing geospatial data?
Good morning, Is Coveo managing Geospatial Data? Could I store coordinates and try to search for something near to a point?
Thanks so much! Lautaro
Yes it does, but frankly it could be better documented (sent an email about this). This is done through what we call query functions, which allow generating temporary, dynamic field values for the duration of a query. Those values can then be used as a filter. For example the following expression creates a dynamic field called
@distance holding the distance from the specified coordinates.
$qf(function:'dist(@latitude, @longitude, 46.8167, -71.2167)', fieldName: 'distance')
You can put this somewhere in your query through the query box for testing or in the advanced expression through JS for more complex purposes.
Then, in the same query you can do:
… which will match only results for which the coordinates were in a radius of 1234 from the coordinates specified in the query.
Some more information available here: https://developers.coveo.com/display/public/SearchREST/Standard+Query+Extensions#StandardQueryExtensions-$qf