Skip to content
Snippets Groups Projects
Commit e118e4c7 authored by Dennis's avatar Dennis
Browse files

.

parent 1a95d854
No related branches found
No related tags found
No related merge requests found
...@@ -4,6 +4,9 @@ $(function () { ...@@ -4,6 +4,9 @@ $(function () {
// Activate search suggestions for the search bar in the header and for the // Activate search suggestions for the search bar in the header and for the
// search bar used in the body. // search bar used in the body.
})
$('.site-search input, .search').autocomplete({ $('.site-search input, .search').autocomplete({
delay: 500, delay: 500,
html: true, html: true,
...@@ -13,9 +16,7 @@ $(function () { ...@@ -13,9 +16,7 @@ $(function () {
$.getJSON(url, {q: request.term}) $.getJSON(url, {q: request.term})
.done(function (data) { .done(function (data) {
console.log(data); console.log(data);
response(data); response(data.result.spellcheck.suggestions[1].suggestion);
}); });
} }
}); });
\ No newline at end of file
})
...@@ -53,5 +53,5 @@ def autocomplete(context, data_dict): ...@@ -53,5 +53,5 @@ def autocomplete(context, data_dict):
raise SearchError('SOLR returned an error running query: %r Error: %r' % raise SearchError('SOLR returned an error running query: %r Error: %r' %
(query, e)) (query, e))
suggest = solr_response.raw_response.get('spellcheck') suggest = solr_response.raw_response
return suggest return suggest
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment