SearchIndexBuilder
Declares a search index and the Templates whose Items it indexes.
Remarks
Section titled “Remarks”The index is queried at run time through apps.<app>.searches.<key>. Its member Templates are
tracked in a Union with the same key on the declaring App.
- AppBuilder.addSearch
- SearchIndexDefinition for the emitted Definition
- ReadSearchIndexInstance for querying the index inside an execution
Extends
Section titled “Extends”Type Parameters
Section titled “Type Parameters”TTypes
Section titled “TTypes”TTypes extends AppBuilderTypes = AppBuilderTypes
Generated type mapping of the App, used to type indexed Items.
Properties
Section titled “Properties”
readonlyprn:string
Platform Resource Name of the declared resource, derived from the App key and resource key.
Inherited from
Section titled “Inherited from”
readonlyunion:UnionBuilder
Union holding the indexed Templates.
Methods
Section titled “Methods”addTemplate()
Section titled “addTemplate()”addTemplate<
TTemplate>(template,handler):this
Indexes Items of a Template using the given handler.
Type Parameters
Section titled “Type Parameters”TTemplate
Section titled “TTemplate”TTemplate extends TemplateBuilder
Template being indexed, used to type the handler’s Item.
Parameters
Section titled “Parameters”template
Section titled “template”TTemplate
Template whose Items are indexed.
handler
Section titled “handler”SearchIndexHandler<ExtractReadItem<TTemplate["prn"], TTypes>>
Converter from an Item to text and facets.
Returns
Section titled “Returns”this
This builder for chaining.
Remarks
Section titled “Remarks”The handler converts each Item into text for term searches and facets for facet queries. Adding a Template that is already indexed replaces its handler.
setDescription()
Section titled “setDescription()”setDescription(
description):this
Sets the description emitted into the definition and rendered in generated reference and application assets.
Parameters
Section titled “Parameters”description
Section titled “description”string
Human-readable description of the resource.
Returns
Section titled “Returns”this
This builder for chaining.
Inherited from
Section titled “Inherited from”toDefinition()
Section titled “toDefinition()”toDefinition():
SearchIndexDefinition
Emits the Definition of this index, including its handlers keyed by Template PRN.

