Skip to content

Commit

Permalink
Use search aggregate filter on GHES URLs (#51116)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbe authored and pull[bot] committed Jun 18, 2024
1 parent 454838c commit 986f163
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/search/middleware/contextualize.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ export default async function contextualizeSearch(req, res, next) {
}
}

// Feature flag for now XXX
if (req.context.currentVersion === 'enterprise-cloud@latest') {
// Feature flag
if (
['enterprise-cloud', 'enterprise-server'].includes(req.context.currentVersion.split('@')[0])
) {
search.aggregate = ['toplevel']
}

Expand Down

0 comments on commit 986f163

Please sign in to comment.