Retrieve Algolia results from one or several indices with autocomplete-preset-algolia.
The getAlgoliaResults function lets you query one or several Algolia indices.Using getAlgoliaResults lets Autocomplete batch all queries using the same search client into a single network call,
and thus minimize search unit consumption.
It also works out of the box with the components
exposed in templates.
If you’re using autocomplete-js,
you don’t need to import the preset separately.
The package includes all Algolia utilities, with the appropriate user agents and virtual DOM support.
The function to transform the Algolia response before passing it to the Autocomplete state.
You have access to the full Algolia results,
as well as the pre-computed hits and facet hits.
This is useful to manipulate the hits,
or store data from the results in the context.This is the default implementation: