Update plugins/catalog-backend/src/service/DefaultEntitiesCatalog.ts

Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Signed-off-by: airavichandra <airavichandra@expediagroup.com>
This commit is contained in:
airavichandra
2022-11-28 19:36:21 -08:00
committed by GitHub
parent 8fc4bd23c3
commit 9e65298395
@@ -404,7 +404,7 @@ export class DefaultEntitiesCatalog implements EntitiesCatalog {
const dbQuery = db<DbSearchRow>('search')
.join('final_entities', 'search.entity_id', 'final_entities.entity_id')
.where('search.key', facet.toLocaleLowerCase('en-US'))
.count('search.entity_id as count')
.count('search.entity_id', { as: 'count' })
.select({ value: 'search.original_value' })
.groupBy('search.original_value');