@pod-os/core / SearchGateway
Class: SearchGateway
Defined in: src/search/SearchGateway.ts:12
Constructors
Constructor
new SearchGateway(
store,session,profileGateway):SearchGateway
Defined in: src/search/SearchGateway.ts:18
Parameters
store
session
profileGateway
Returns
SearchGateway
Methods
addToLabelIndex()
addToLabelIndex(
thing,labelIndex):Promise\<void>
Defined in: src/search/SearchGateway.ts:78
Parameters
thing
labelIndex
Returns
Promise\<void>
buildSearchIndex()
buildSearchIndex():
Promise\<SearchIndex>
Defined in: src/search/SearchGateway.ts:38
Build a search index on demand.
While logged in, the profile is resolved from the current session's webId and the index is built from the profile's label indexes and cached, so that repeated calls return the same instance.
While logged out, a fresh empty index is returned that is NOT cached — the next call after login is a cache miss and builds.
Returns
Promise\<SearchIndex>
clear()
clear():
void
Defined in: src/search/SearchGateway.ts:59
Empties the cached search index in place and drops the cache reference, so that consumers already holding the instance see an empty index immediately and the next call to buildSearchIndex builds a new index.
Returns
void
createDefaultLabelIndex()
createDefaultLabelIndex(
profile):Promise\<LabelIndex>
Defined in: src/search/SearchGateway.ts:85
Parameters
profile
Returns
Promise\<LabelIndex>