migrateToCollectionKey

Function

Function that can migrate a legacy search category to a wellknown collection key. Useful when the caller has an unknown value that could either be a search category or wellknown collection.

If the value passed is not a search category, it is returned as-is.

Parameters

Parameter Type Default Notes
collectionOrSearchCategory Required LegacySearchCategory | WellKnownCollection

key to be migrated

Returns

the migrated wellknown collection key

Property Type Notes
channel "channel"
content "content"
dataset "dataset"
discussion "discussion"
document "document"
event "event"
eventAttendee "eventAttendee"
feedback "feedback"
initiative "initiative"
people "people"
project "project"
site "site"
team "team"
template "template"

Function defined in common/src/search/utils.ts:286