From fd3a6521c40c8e6fa89126e157f89cb1d062bcec Mon Sep 17 00:00:00 2001 From: Roy Hewitt Date: Mon, 26 Oct 2015 14:55:26 -0400 Subject: [PATCH] Update glossary.js Corrected error where the name of the term was not properly stored in the lunrjs index. --- _includes/js/glossary.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_includes/js/glossary.js b/_includes/js/glossary.js index 59ba826..9246450 100644 --- a/_includes/js/glossary.js +++ b/_includes/js/glossary.js @@ -74,7 +74,7 @@ $(function() { //Create Lunr.js index of glossary terms function createIndex(data) { index = lunr(function() { - this.field('term', {boost: 10}); + this.field('name', {boost: 10}); this.field('definition'); this.field('tags', {boost: 3}); this.ref('id'); @@ -83,7 +83,7 @@ $(function() { $.each(data, function(i, term) { index.add({ id: i, - name: term.term, + name: term.name, definition: term.definition, tags: term.tags.toString() });