SearchIndexHandler
SearchIndexHandler<
TItem> = (item,ctx) =>Promise<void>
Describes one Item to a search index by adding text and facets to the context.
Type Parameters
Section titled “Type Parameters”TItem extends ReadItem = ReadItem
Item type of the indexed Template.
Parameters
Section titled “Parameters”TItem
Item being indexed.
Context that collects the Item’s text and facets.
Returns
Section titled “Returns”Promise<void>
Example
Section titled “Example”Indexing the step ids stored on an Item
stepSearch.addTemplate(automationVersion, async (item, ctx) => { const steps = item.properties.steps; if (Array.isArray(steps)) for (const step of steps) ctx.uuid(step.id);});
