Gravatar for

Question by Lautaro Bonetto, Apr 23, 2015 10:25 PM

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

1 Reply
Gravatar for

Answer by Martin Laporte, Apr 24, 2015 3:10 AM

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:$qf

Gravatar for

Comment by François Dallaire, Apr 29, 2015 7:50 AM

A topic is now available:

Ask a question