ReadSearchIndexInstance
Runs searches over the Items indexed by a search index within a read execution.
Remarks
Section titled “Remarks”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>.
Example
Section titled “Example”Finding an Item by facet
const results = await ctx.apps.workflow.searches.step.query({ facets: [`uuid:${input.stepId}`] }).execute();- WriteSearchIndexInstance
- SearchIndexBuilder for declaring a search index
- SearchIndexDefinition for the emitted Definition
Extends
Section titled “Extends”BaseSearchIndexInstance
Type Parameters
Section titled “Type Parameters”TReadItem
Section titled “TReadItem”TReadItem extends ReadItem = ReadItem
Item type the index yields.
Properties
Section titled “Properties”
readonlyprn:string
PRN identifying this search index within the definition.
Inherited from
Section titled “Inherited from”BaseSearchIndexInstance.prn
Methods
Section titled “Methods”query()
Section titled “query()”query(
query):ItemCursorSelector<TReadItem>
Returns a selector over the Items matching query, for further filtering, paging, and
execution.
Parameters
Section titled “Parameters”Term and facets to match; an empty query matches every indexed Item.
Returns
Section titled “Returns”ItemCursorSelector<TReadItem>

