Skip to content

SearchIndexHandler

SearchIndexHandler<TItem> = (item, ctx) => Promise<void>

Describes one Item to a search index by adding text and facets to the context.

TItem extends ReadItem = ReadItem

Item type of the indexed Template.

TItem

Item being indexed.

SearchIndexContext

Context that collects the Item’s text and facets.

Promise<void>

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);
});

SearchIndexBuilder.addTemplate