You can extend or control the functionality of the elevio search element.

Handling clicking on a search result

If you would like to override what happens when you click on a search result, you can do this by using a combination of attributes you provide to the search element html and using some on events.

First, disable the default behaviour of opening the Assistant by adding the attribute: data-prevent-open-assistant="true"

Next, give the element a 'source-name' so you can identify which search element the click events come from: data-source-name="my-search"

Your elevio element html will end up looking like this:

<elevio-element data-type="search" data-prevent-open-assistant="true" data-source-name="my-search"></elevio-element>

Then register to receive when someone clicks on a search result.

window._elev.on('search:article:clicked', function(data) {
console.log('The article id is: ', data.articleId);
console.log('The category id is: ', data.categoryId);
console.log('The search came from: ', data.source);

You can then handle the event in anyway you choose, such as opening the result in your own Knowledge base, making an API call to get the article, or showing the article element. It's up to you.