Skip to content

Instantly share code, notes, and snippets.

@duhaime
Created December 3, 2021 01:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duhaime/d1190bc65ef55a38ef043cfae704744b to your computer and use it in GitHub Desktop.
Save duhaime/d1190bc65ef55a38ef043cfae704744b to your computer and use it in GitHub Desktop.
Algolia Minimal
import algoliaClient from "algoliasearch/lite"
window.client = algoliaClient(
'latency',
'6be0576ff61c053d5f9a3225e2a90f76'
)
window.result = window.client.multipleQueries(
[{
indexName: 'instant_search',
query: 'headphones',
params: {
hitsPerPage: 3,
}
}, {
indexName: 'instant_search_price_desc',
query: 'headphones',
params: {
hitsPerPage: 2,
//filters: '_tags:promotion'
}
}]
)
window.result.then(r => {
console.log(' * got result', r)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment