ammachado commented on code in PR #1729:
URL: https://github.com/apache/camel-website/pull/1729#discussion_r3907086431
##########
antora-ui-camel/src/js/08-docsearch.js:
##########
@@ -0,0 +1,128 @@
+;(function () {
+ 'use strict'
+
+ // The index has no attributeForDistinct and no attributesForFaceting, so
both the sub-project
+ // exclusion and the per-page dedupe below have to run client side. Fetch
deeper than the
+ // DocSearch default of 20 so filtering does not starve the result list: at
20 a query like
+ // "timer" is left with hits from a single page. Measured against the live
index, 75 lifts
+ // "timer" from 5 to 8 distinct pages and "aggregate" from 9 to 13; 100 adds
almost nothing
+ // beyond that but doubles the response to ~36 KB gzipped.
+ var HITS_PER_PAGE = 75
Review Comment:
Good catch, tightened the test to
`assert.equal(searchParameters.hitsPerPage, 75, ...)` so a regression to 50 (or
any other value) now fails it. Leaving the PR description as-is for the
maintainer to reconcile, since that's prose rather than code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]