Breaking changes:
resultsmodel has changed. If you are accessing these directly from state, you will need to update your code. The data complete data model can be seen
here: https://github.com/elastic/search-ui/tree/8ddad47165d17c768a024a134059f215f9096365/packages/react-search-ui/src/types.
Before:
// Results were contained in wrapper objects.
ResultList {
rawResults: [], // List of raw `results` from JSON response
rawInfo: { // Object wrapping the raw `meta` property from JSON response
meta: {}
},
results: [ResultItem], // List of `results` wrapped in `ResultItem` type
info: { // Currently the same as `rawInfo`
meta: {}
}
}
ResultItem {
getRaw(fieldName), // Returns the HTML-unsafe raw value for a field, if it exists
getSnippet(fieldName) // Returns the HTML-safe snippet value for a field, if it exists
}After:
// Results are now just an array of raw response result items
ex.
[{
title: {
raw: "War and Peace",
snippet: "War and <em>Peace</em>"
}
}]filtersmodel has changed. If you are accessing filters directly from state, you will need to update your code. The data model can be seen
here: https://github.com/elastic/search-ui/tree/8ddad47165d17c768a024a134059f215f9096365/packages/react-search-ui/src/types.
Before:
[
{
"states": [
"California"
]
},
{
"acres": [
{
"to": 1000,
"from": 0,
"name": "Small"
}
]
}
]After:
[
{
"field": "states",
"values": [
"California"
],
"type": "all"
},
{
"field": "acres",
"values": [
{
"to": 1000,
"from": 0,
"name": "Small"
}
],
"type": "all"
}
]- Connectors have a completely different interface. They now accept state
directly and return state, rather than App Search syntax. If you had
created a custom connector, you will need to rework your solution. More details
on this are documented in the "Creating your own Connector" section of
the README. This will only affect you if you've created a custom connector. - Facet component views have been renamed:
- SingleRangeSelectFacet > SingleSelectFacet
- MultiValueFacet > MultiCheckboxFacet
- SingleValueLinksFacet > SingleLinksFacet