From 51eb92543183eff51662b65d5c969129942f7658 Mon Sep 17 00:00:00 2001 From: Lucas Date: Tue, 7 Mar 2023 09:52:59 +0100 Subject: [PATCH 1/2] Increase the number of results of the doc search bar --- _includes/footer.html | 2 +- resources/js/functions.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/footer.html b/_includes/footer.html index 7e24a25d00..8e7f3fcfd0 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -106,7 +106,7 @@ apiKey: 'fbc439670f5d4e3730cdcb715c359391', indexName: 'scala-lang', inputSelector: '#doc-search-bar', - algoliaOptions: { 'facetFilters': ["language:en"] }, + algoliaOptions: { 'facetFilters': ["language:en"], 'hitsPerPage': 7 }, debug: false // Set debug to true if you want to inspect the dropdown }); } diff --git a/resources/js/functions.js b/resources/js/functions.js index ed735f6a96..c31e52b22e 100644 --- a/resources/js/functions.js +++ b/resources/js/functions.js @@ -338,7 +338,7 @@ $(document).ready(function() { resultsContainer: document.getElementById('result-container'), json: '/resources/json/search.json', searchResultTemplate: '
  • {title}
  • ', - limit: 7, + limit: 5, }); $("#blog-search-bar").on("change paste keyup", function() { From 428cb98de5e6cb9f70288046547196f7f9bb41d8 Mon Sep 17 00:00:00 2001 From: Lucas Date: Sat, 11 Mar 2023 15:04:13 +0100 Subject: [PATCH 2/2] Correct the number of hitsPerPage and the duplication --- _includes/footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_includes/footer.html b/_includes/footer.html index 8e7f3fcfd0..b00049db89 100644 --- a/_includes/footer.html +++ b/_includes/footer.html @@ -106,7 +106,7 @@ apiKey: 'fbc439670f5d4e3730cdcb715c359391', indexName: 'scala-lang', inputSelector: '#doc-search-bar', - algoliaOptions: { 'facetFilters': ["language:en"], 'hitsPerPage': 7 }, + algoliaOptions: { 'facetFilters': ["language:en"], 'hitsPerPage': 6, 'distinct': 1}, debug: false // Set debug to true if you want to inspect the dropdown }); }