From 6d67ac2a1b93d6c95881cb2f17250a7a8279def6 Mon Sep 17 00:00:00 2001 From: Andy Rothfusz Date: Mon, 7 Oct 2013 17:51:07 -0700 Subject: [PATCH 1/2] Insert popularity and boost docs results. --- docs/theme/docker/layout.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/theme/docker/layout.html b/docs/theme/docker/layout.html index 19c35f4990..249da9eb2b 100755 --- a/docs/theme/docker/layout.html +++ b/docs/theme/docker/layout.html @@ -6,6 +6,9 @@ {{ meta['title'] if meta and meta['title'] else title }} - Docker Documentation + + + {%- set url_root = pathto('', 1) %} {%- if url_root == '#' %}{% set url_root = '' %}{% endif %} @@ -168,6 +171,10 @@ Swiftype.resultContainingElement = '#st-results-container'; Swiftype.attachElement = '#st-search-input'; Swiftype.renderStyle = "overlay"; + + Swiftype.searchFunctionalBoosts = {"page": {"popularity": "linear"}}; var script = document.createElement('script'); script.type = 'text/javascript'; From 6545e53803a3f0d908510d87b350ca9641f50df2 Mon Sep 17 00:00:00 2001 From: Andy Rothfusz Date: Wed, 9 Oct 2013 12:22:14 -0700 Subject: [PATCH 2/2] Clean up javascript comment. --- docs/theme/docker/layout.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/theme/docker/layout.html b/docs/theme/docker/layout.html index 249da9eb2b..e415e97235 100755 --- a/docs/theme/docker/layout.html +++ b/docs/theme/docker/layout.html @@ -171,9 +171,8 @@ Swiftype.resultContainingElement = '#st-results-container'; Swiftype.attachElement = '#st-search-input'; Swiftype.renderStyle = "overlay"; - + // from https://swiftype.com/questions/how-can-i-make-more-popular-content-rank-higher + // Use "page" for now -- they don't subgroup by document type yet. Swiftype.searchFunctionalBoosts = {"page": {"popularity": "linear"}}; var script = document.createElement('script');