              var ref = results[i]['ref'];
                var url = documents[ref]['url'];
                var name = documents[ref]['name'];
                var body = documents[ref]['body'].substring(0,160)+'...';
                document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML = document.querySelectorAll('#lunrsearchresults ul')[0].innerHTML + "<li class='lunrsearchresult'><a href='" + url + "'><span class='name'>" + name + "</span><br /><span class='body'>"+ body +"</span><br /><span cla