Difference between getAlgoliaResults & getAlgoliaHits?

What is the difference between the two? Having a hard time finding it in the docs

Hey @ilyafish! getAlgoliaHits returns an array of matched records ([{ objectID: '', _highlightResult: {} }, /* ... */ }]) while getAlgoliaResults returns an array of responses containing the hits ([{ hits: [], nbHits: 0, index: 'index' }]).

getAlgoliaHits is therefore a convenient util that maps the hits from the Algolia response for you.

1 Like