getAlgoliaFacetHits
Retrieves Algolia facet hits from multiple indices.
The getAlgoliaFacetHits
function lets you query facet hits several Algolia indices at once.
note
If you're using autocomplete-js
, all Algolia utilities are available directly in the package with the right user agents and the virtual DOM layer. You don't need to import the preset separately.
#
InstallationFirst, you need to install the preset.
Then import it in your project:
If you don't use a package manager, you can use a standalone endpoint:
#
Example#
ParameterssearchClient
#
SearchClient
| required
The initialized Algolia search client.
queries
#
FacetQuery[]
| required
The queries to search for, with the following parameters:
indexName
#
string
| required
The index name.
params
#
Algolia search for facet values parameters.
These are the default parameters. You can leave them as is and specify other parameters, or override them.
info
If you override highlightPreTag
and highlightPostTag
, you won't be able to use the built-in highlighting utilities such as highlightHit
.
#
ReturnsThe function returns a promise that resolves to a response with the following schema: