Skip to content
This repository has been archived by the owner on Jul 11, 2023. It is now read-only.

Commit

Permalink
docs(migration): mention changed methods (#732)
Browse files Browse the repository at this point in the history
see #722 for all info
  • Loading branch information
Haroenv committed Nov 18, 2019
1 parent 7151f56 commit f95e680
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions documentation-src/metalsmith/content/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,21 @@ SearchParameters no longer contains a default value for the parameters, from the
}
```

### Errors on getters

There were multiple places in SearchParameters or SearchResults which would throw an error when e.g. a refinement is requested which isn't set up via facets. This behavior was confusing, and especially unhelpful in InstantSearch where we have situations where we try to fetch before the results are in. We chose for that reason to migrate those cases to the default response:

- `SearchResults.getFacetValues` -> undefined
- `SearchResults.getFacetStats` -> undefined
- `SearchParameters.getConjunctiveRefinements` -> []
- `SearchParameters.getDisjunctiveRefinements` -> []
- `SearchParameters.getExcludeRefinements` -> []
- `SearchParameters.getHierarchicalFacetBreadcrumb` -> []
- `SearchParameters.isFacetRefined` -> false
- `SearchParameters.isExcludeRefined` -> false
- `SearchParameters.isDisjunctiveFacetRefined` -> false
- `SearchParameters.isHierarchicalFacetRefined` -> false

### Removed methods

- `getQueryParameter` & `helper.state.getQueryParameter`
Expand All @@ -98,3 +113,5 @@ You need to filter the returned object yourself using e.g. `Object.fromEntries(O
- `helper.state.mutateMe`

- `helper.getState` -> `helper.state`

- `helper.isRefined` -> `helper.hasRefinements`

0 comments on commit f95e680

Please sign in to comment.