appbaseio / appbaseio/reactivesearch
ReactiveSearch: Total hits returns to default 10000 after 'size' props changes
- Dominant language
- JavaScript
- Stars
- 4.9k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
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**
{
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
Contributor guide
Assessment
This issue has not been assessed yet.