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.
Optional
options: {Additional options to configure behaviour.
Optional
documentTypes?: string[]Optionally provide an array of document types. Only entries of that type will be searched for.
Optional
filterEntries?: StringTreeEntryFilterA filter function to apply to each candidate entry.
Optional
limit?: 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.
Optional
ownership?: 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
_addProtected
Add a leaf node to the word tree index.
The document or compendium index entry to add.
Optional
options: { pack?: any } = {}Additional information for indexing.
Optional
pack?: anyThe compendium that the index belongs to.
Protected
_indexProtected
Aggregate the compendium index and add it to the word tree index.
The compendium pack.
Protected
_indexProtected
Add all of a parent document's embedded documents to the index.
The parent document.
Protected
_indexProtected
Aggregate 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.