New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(connectAutoComplete): allow usage with hits from a single index #75

Merged
merged 3 commits into from May 2, 2017

Conversation

Projects
None yet
2 participants
@Haroenv
Copy link
Member

Haroenv commented Apr 30, 2017

Summary

fixes #74

the strategy to get the hits from all indices assumed it needed to loop over the index names, but that’s only true if we’re in a situation with multiple hits.

You can detect this if there is a hits key on the searchResults, and in that case we can just return the hits

Result

No more iteration over the searchResults object if there is a hits (which is an array) key on it.

@Haroenv Haroenv force-pushed the fix/autocomplete-single-index branch from 2eca56f to a88674b Apr 30, 2017

mthuret and others added some commits May 2, 2017

@mthuret mthuret merged commit 8b3b358 into master May 2, 2017

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
deploy/netlify Deploy preview ready!
Details

@mthuret mthuret deleted the fix/autocomplete-single-index branch May 2, 2017

mthuret added a commit that referenced this pull request May 2, 2017

v4.0.0-beta.5
<a name="4.0.0-beta.5"></a>
# [4.0.0-beta.5](v4.0.0-beta.4...v4.0.0-beta.5) (2017-05-02)

### Bug Fixes

* **connectAutoComplete:** allow usage with hits from a single index (#75) ([8b3b358](8b3b358)), closes [#74](#74)
* **InstantSearch:** update algoliaClient when it change (#70) ([9e97dbd](9e97dbd))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment