-
Notifications
You must be signed in to change notification settings - Fork 471
Description
Affected Projects
ReactiveSearch
Describe the bug
I set defaultQuery as below
defaultQuery={props => ({
track_total_hits: true
})}
Now I get the correct total hits which is more than default 10000,
But when the 'size' property is changed in my ReactiveSearch code, defaultQuery doesn't work and total hits goes back 10000.
I saw in other thread to pass ?rest_total_hits_as_int=true in request parameter. But I don't know how and where.
Any sample code is appreciated.
To Reproduce
<ReactiveList
dataField="main_no" /
componentId="Result01"
react={{
and: ["Main No"],
}}
pagination={true}
paginationAt="both"
showResultStats={true}
size={this.state.selectedRow.value}
defaultQuery={() => {
return { track_total_hits: true };
}}
preserveResults={true}
render={(this.state.selectedOption.value === 'eval') ? this.ReactiveList : this.ReactiveList2}
onPageChange={
this.hideid
}
style={{
padding: "0.015625em",
}}
/>
Steps to reproduce the behavior:
Change the size from the interface
Expected behavior
Total number of results should not be changed to default value:10000