Skip to content

Instantly share code, notes, and snippets.

@bobylito
Last active August 29, 2015 14:26
Show Gist options
  • Save bobylito/67173d47abe0e26b3fcd to your computer and use it in GitHub Desktop.
Save bobylito/67173d47abe0e26b3fcd to your computer and use it in GitHub Desktop.
Algolia search with '
var algoliasearch = require('algoliasearch');
var algoliasearchHelper = require('algoliasearch-helper');
var client = algoliasearch('HJJNGIYUXM', '5b51ef15f04155d38a3afe69155ac0d2');
var helper = algoliasearchHelper(client, 'seller14d05f716649588597000000',{
facets:['tags']
});
helper.on('result', function(content) {
console.log( JSON.stringify( content ) );
});
helper.on('error', function(err) {
console.log(error);
});
helper.addRefine('tags', 'can't find anywhere');
helper.search();
{
"name": "refine-facet-issue",
"version": "1.0.0",
"description": "",
"main": "index.js",
"author": "algolia <hey@algolia.com>",
"license": "MIT",
"dependencies": {
"algoliasearch": "3.7.5",
"algoliasearch-helper": "2.1.2"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment