Gravatar for

Question by Vincent, Apr 19, 2017 9:17 PM

Triggering search with Javascript

The issue we’re having is integrating Google maps into Coveo search – we need to re-trigger the search based on map zoom/pan. I’m trying to add the lat/long coordinates to the query but the search results don’t refresh. I’m sure this is an easy fix but I’m stumped.

2 Replies
Gravatar for

Answer by Jean-François L'Heureux, Apr 19, 2017 9:26 PM

Have you looked at the Coveo JavaScript Search Framework tutorial?

It is fairly easy to trigger a query:

Gravatar for

Comment by beckjohnson, Apr 19, 2017 11:28 PM

Yes, I see the request in the network tab, and I see the warning "A search was triggered, but no analytics event was logged", but the search results don't refresh.

Gravatar for

Answer by beckjohnson, Apr 28, 2017 11:26 PM

I was able to trigger a search with a different syntax:

Ask a question