Class IndexEvent

An event emitted when the search index is being prepared.

Constructors

Properties

searchFields: Record<string, string>[]

Additional search fields to be used when creating the search index. name, comment and document may be specified to overwrite TypeDoc's search fields.

Do not use id as a custom search field.

searchFieldWeights: Record<string, number> = ...

Weights for the fields defined in searchFields. The default will weight name as 10x more important than comment and document content.

If a field added to searchFields is not added to this object, it will not be searchable.

Do not replace this object, instead, set new properties on it for custom search fields added by your plugin.

May be filtered by plugins to reduce the results available. Additional items should not be added to this array.

If you remove an index from this array, you must also remove the same index from searchFields. The removeResult helper will do this for you.

Methods

  • Remove a search result by index.

    Parameters

    • index: number

    Returns void

Events

PREPARE_INDEX = "prepareIndex"

Triggered on the renderer when the search index is being prepared.