Indexer
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
The wiki object associated with this indexer.
Returns
Indexer
Properties
wiki
protectedwiki:Wiki
Defined in: src/modules/indexers/index.d.ts:7
Methods
init()
abstractinit():void
Defined in: src/modules/indexers/index.d.ts:20
Initializes the indexer, performing any necessary setup.
Returns
void
rebuild()
abstractrebuild():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()
abstractupdate(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
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
The tiddler before the update.
Returns
void