Issue Type:
Question
Platform:
Web
Description:
I am currently trying to build complex sorting component and since there is not enough documentation on it I have to ask here. I will split the question in two parts.
-
Using the default sortOptions of the ReactiveList result component, there is a problem with result relevance. To be more precise, if I set default value to the sort and then try typing something in the search component, the results will still be sorted by default sort value instead by relevance. Is there a way to avoid this with the default sortOptions provided by Reactive Search? So to have ie. SingleDropdownList component to change the current sorting of the elements in the ReactiveList?
-
I tried to create and put CustomSort inside ReactiveComponent. The code for it is
<ReactiveComponent
key="componentSort"
componentId="ComponentSort"
>
<CustomSort sortData={sortOptions} />
</ReactiveComponent>
CustomSort component has setQuery which gets triggered on button click (there are multiple sortOptions).
setValue(value) {
this.props.setQuery({
"query": {
"match_all": {}
},
"sort": {
value: {"order": "desc"}
}
});
}
Query is completely the same as the one being sent by default sortOptions (when checked in dev tools). However query does not update Reactive List component (ReactiveList has custom sort component in react). Should I have defaultQuery even if I do not want to set default sort? Is this the proper way to set up the custom sort?
Great project btw. Much more customizations available compared to SearchKit.
Screenshots: N/A
Reactivesearch version: 2.6.12
Browser: All
Issue Type:
Question
Platform:
Web
Description:
I am currently trying to build complex sorting component and since there is not enough documentation on it I have to ask here. I will split the question in two parts.
Using the default
sortOptionsof theReactiveListresult component, there is a problem with result relevance. To be more precise, if I set default value to the sort and then try typing something in the search component, the results will still be sorted by default sort value instead by relevance. Is there a way to avoid this with the defaultsortOptionsprovided by Reactive Search? So to have ie.SingleDropdownListcomponent to change the current sorting of the elements in theReactiveList?I tried to create and put
CustomSortinsideReactiveComponent. The code for it isCustomSort component has setQuery which gets triggered on button click (there are multiple sortOptions).
Query is completely the same as the one being sent by default
sortOptions(when checked in dev tools). However query does not updateReactive Listcomponent (ReactiveList has custom sort component inreact). Should I havedefaultQueryeven if I do not want to set default sort? Is this the proper way to set up the custom sort?Great project btw. Much more customizations available compared to SearchKit.
Screenshots: N/A
Reactivesearch version: 2.6.12
Browser: All