Returns a Promise that resolves when the indexing process is complete.
Add an entry to the index.
The document entry.
Index all available documents in the world and store them in a word tree.
Return entries that match the given string prefix.
The prefix.
Optionaloptions: {Additional options to configure behaviour.
OptionaldocumentTypes?: string[]Optionally provide an array of document types. Only entries of that type will be searched for.
OptionalfilterEntries?: StringTreeEntryFilterA filter function to apply to each candidate entry.
Optionallimit?: numberThe maximum number of items per document type to retrieve. It is important to set this value as very short prefixes will naturally match large numbers of entries.
Optionalownership?: anyOnly return entries that the user meets this ownership level for.
A number of entries that have the given prefix, grouped by document type.
Remove an entry from the index.
The document entry.
Replace an entry in the index with an updated one.
The document entry.
Protected_addProtectedAdd a leaf node to the word tree index.
The document or compendium index entry to add.
Optionaloptions: { pack?: any } = {}Additional information for indexing.
Optionalpack?: anyThe compendium that the index belongs to.
Protected_indexProtectedAggregate the compendium index and add it to the word tree index.
The compendium pack.
Protected_indexProtectedAdd all of a parent document's embedded documents to the index.
The parent document.
Protected_indexProtectedAggregate all documents and embedded documents in a world collection and add them to the index.
The name of the documents to index.
This class is responsible for indexing all documents available in the world. Stores documents using a word tree structure that allows for efficient searching.