Skip to main content

Indexer

tw5-typed


tw5-typed / modules/indexers / Indexer

Abstract Class: Indexer

Defined in: src/modules/indexers/index.d.ts:6

Abstract class representing an indexer in TiddlyWiki. Indexers maintain indexes of tiddlers organized efficiently for different types of access, improving the speed of certain filter operations.

Url​

https://tiddlywiki.com/dev/#indexer%20modules

Constructors​

Constructor​

new Indexer(wiki): Indexer

Defined in: src/modules/indexers/index.d.ts:13

Constructs an Indexer instance.

Parameters​

wiki​

Wiki

The wiki object associated with this indexer.

Returns​

Indexer

Properties​

wiki​

protected wiki: Wiki

Defined in: src/modules/indexers/index.d.ts:7

Methods​

init()​

abstract init(): void

Defined in: src/modules/indexers/index.d.ts:20

Initializes the indexer, performing any necessary setup.

Returns​

void


rebuild()​

abstract rebuild(): void

Defined in: src/modules/indexers/index.d.ts:25

Rebuilds the indexer's index from scratch. Typically used after a significant number of changes in the wiki.

Returns​

void


update()​

abstract update(updateDescriptor): void

Defined in: src/modules/indexers/index.d.ts:39

Updates the index based on changes to a tiddler.

Parameters​

updateDescriptor​

Describes the changes to the tiddler.

new​

{ exists: boolean; shadow: boolean; tiddler: Tiddler; }

The state of the tiddler after the update.

new.exists​

boolean

Indicates if the tiddler exists after the update.

new.shadow​

boolean

Indicates if the tiddler is a shadow tiddler after the update.

new.tiddler​

Tiddler

The tiddler after the update.

old​

{ exists: boolean; shadow: boolean; tiddler: Tiddler; }

The state of the tiddler before the update.

old.exists​

boolean

Indicates if the tiddler existed before the update.

old.shadow​

boolean

Indicates if the tiddler was a shadow tiddler before the update.

old.tiddler​

Tiddler

The tiddler before the update.

Returns​

void