Configuration
In order to setup the Typesense configuration you need the following:Schema options
On Enterspeed schema level you have the following options:Example of usage
- JavaScript
- JSON
Content schema with Typesense destination
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
| Setting | Description |
|---|---|
| Typesense Server URL | The Server URL for the Typesense cluster you want to integrate to |
| Typesense API Key | A Typesense Admin API key |
| Enterspeed Environment Client API Key | The API key for an Enterspeed Environment client. This is used to fetch the view that will be inserted into Typesense |
| Option | Required | Description |
|---|---|---|
| collection | Required | The Typesense collection the data should be send to |
| id | Optional | The value that should be used as id in for the Typesense document. If omitted, the Enterspeed view id will be used |
| dirtyValues | Optional | Defines what Typesense should do when the type of a particular field being indexed does not match the Typesense schema. Valid values are: coerce_or_reject (default), coerce_or_drop, drop, rejectRefer to the Typesense documentation for more information |
/** @type {Enterspeed.FullSchema} */
export default {
triggers: function(context) {
context.triggers('cms', ['content']);
},
actions: function (sourceEntity, context) {
context.destination('typesense').options({
id: sourceEntity.originId,
collection: 'content'
dirtyValues: 'coerce_or_reject'
});
},
properties: function ({properties: p, url}, context) {
return {
product: {
url: url,
title: p.title,
content: p.text
}
}
}
{
"triggers": {
"cms": ["content"]
},
"destinations": [
{
"alias": "typesense",
"options": {
"id": "{originId}",
"collection": "content",
"dirtyValues": "coerce_or_reject"
}
}
],
"properties": {
"url": "{url}",
"title": "{p.title}",
"content": "{p.text}"
}
}
Was this page helpful?