Skip to content

Instantly share code, notes, and snippets.

@radek-baczynski
Created July 26, 2013 10:18
Show Gist options
  • Select an option

  • Save radek-baczynski/6087824 to your computer and use it in GitHub Desktop.

Select an option

Save radek-baczynski/6087824 to your computer and use it in GitHub Desktop.
docplanner algolia integration
$(document).ready(function () {
client = new AlgoliaSearch('docplanner', 'fdd65...',
['docplanner-1.algolia.io', 'docplanner-2.algolia.io', 'docplanner-3.algolia.io']);
var index = client.initIndex('pl_autocomplete');
$('.search-form :text').typeahead({
source: function(query, process) {
index.search(query, function(success, content)
{
console.log(content)
})
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment