Skip to content
This repository has been archived by the owner on Dec 30, 2022. It is now read-only.

feat(indexId): refactor createInstantSearchServer [PART-5] #1843

Merged
merged 7 commits into from
Jan 4, 2019

Conversation

samouss
Copy link
Collaborator

@samouss samouss commented Dec 28, 2018

Summary

This PR does not introduce new feature, it's a refactor of createInstantSearchServer. The logic to create the search parameters and search was hard to follow. We tried to put name on this logic to help the reader to follow what happens. Now each step has a dedicated function: create the search parameters, search into a single index and search into multiple indices.

Changes

  • createInstantSearchServer: extract the logic that was mixed inside findResultsState into multiple functions: getSearchParameters, singleIndexSearch and multiIndexSearch.
  • createInstantSearchManager: the logic for hydrate the results and collect the search parameters move on the component instance.

@samouss samouss requested a review from a team December 28, 2018 15:34
@algobot
Copy link
Contributor

algobot commented Dec 28, 2018

Deploy preview for react-instantsearch ready!

Built with commit 0742df3

https://deploy-preview-1843--react-instantsearch.netlify.com

@samouss samouss force-pushed the feat/part-5-refactor-ssr branch from e04c937 to 6783634 Compare January 3, 2019 15:03
@samouss samouss force-pushed the feat/part-5-refactor-ssr branch from 6783634 to fccab1d Compare January 3, 2019 15:32
@samouss samouss merged commit 4a48f8c into feat/part-4-ssr Jan 4, 2019
@samouss samouss deleted the feat/part-5-refactor-ssr branch January 4, 2019 08:24
samouss added a commit that referenced this pull request Jan 4, 2019
…1842)

* feat(indexId): refactor createInstantSearchServer [PART-5] (#1843)

* feat(indexId): rename getIndex -> getIndexId [PART-6] (#1851)
samouss added a commit that referenced this pull request Jan 4, 2019
* feat(indexId): rely on indexId rather than indexName in SSR [PART-4] (#1842)

* feat(indexId): refactor createInstantSearchServer [PART-5] (#1843)

* feat(indexId): rename getIndex -> getIndexId [PART-6] (#1851)
samouss added a commit that referenced this pull request Jan 4, 2019
* feat(indexId): refactor createInstantSearchManager [PART-3] (#1840)

* feat(indexId): rely on indexId rather than indexName in SSR [PART-4] (#1842)

* feat(indexId): refactor createInstantSearchServer [PART-5] (#1843)

* feat(indexId): rename getIndex -> getIndexId [PART-6] (#1851)
samouss added a commit that referenced this pull request Jan 4, 2019
* feat(indexId): rely on indexId rather than indexName [PART-2] (#1835)

* feat(indexId): refactor createInstantSearchManager [PART-3] (#1840)

* feat(indexId): rely on indexId rather than indexName in SSR [PART-4] (#1842)

* feat(indexId): refactor createInstantSearchServer [PART-5] (#1843)

* feat(indexId): rename getIndex -> getIndexId [PART-6] (#1851)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants