// @username -> username to search in DB
if (query.search.startsWith('@')) query.search = query.search.replace(/^@/, '')
- if (isSearchIndexEnabled(query)) {
+ if (isSearchIndexSearch(query)) {
return searchVideoChannelsIndex(query, res)
}
return searchVideoURI(search, res)
}
- if (isSearchIndexEnabled(query)) {
+ if (isSearchIndexSearch(query)) {
return searchVideosIndex(query, res)
}
})
}
-function isSearchIndexEnabled (query: SearchTargetQuery) {
+function isSearchIndexSearch (query: SearchTargetQuery) {
if (query.searchTarget === 'search-index') return true
const searchIndexConfig = CONFIG.SEARCH.SEARCH_INDEX