Search-Engine-Services

Methods

(static) sendAlgoliaClickEvent(index, queryId, objectIDs, positions) → {Promise.<void>}

Description:
  • Sends an event through the search engine API (as of now, algolia)
Source:
Example
```
sendAlgoliaClickEvent(
  'production_sanity_all',
  '43b15df305339e827f0ac0bdc5ebcaa7',
  ['9780545139700', '9780439784542'],
  [7, 6]
);
```
Parameters:
Name Type Description
index string The index to which the event will be sent.
queryId string The unique identifier for the search query.
objectIDs Array.<string> An array of object IDs that were clicked.
positions Array.<number> An array of positions corresponding to the object IDs clicked.
Returns:
- A promise that resolves when the event is sent.
Type
Promise.<void>