Skip to content

ReadSearchIndexInstance

Runs searches over the Items indexed by a search index within a read execution.

The returned selector is limited to the Templates added to the index and yields read-only Items. Reach an index through ctx.apps.<app>.searches.<key>.

Finding an Item by facet

const results = await ctx.apps.workflow.searches.step.query({ facets: [`uuid:${input.stepId}`] }).execute();
  • BaseSearchIndexInstance

TReadItem extends ReadItem = ReadItem

Item type the index yields.

readonly prn: string

PRN identifying this search index within the definition.

BaseSearchIndexInstance.prn

query(query): ItemCursorSelector<TReadItem>

Returns a selector over the Items matching query, for further filtering, paging, and execution.

SearchQuery

Term and facets to match; an empty query matches every indexed Item.

ItemCursorSelector<TReadItem>