appbaseio / appbaseio/reactivesearch
Set script_fields in ReactiveList
- Dominant language
- JavaScript
- Stars
- 4.9k
- Forks
- 478
- PR merge metrics
- No merged PRs in 30d
Description
**Affected Projects**
ReactiveSearch Web 3.0.3
**Is your feature request related to a problem? Please describe.**
I'd like to include scripted values in the results returned on ReactiveList using the script_fields property
**Describe the solution you'd like**
Support script_fields in defaultQuery or another property on the component
**Additional context**
I tried returning script_fields in defaultQuery and it works, but only if you don't have a sort defined. Once you add a sort, it no longer shows up.
```
defaultQuery={() => {
return {
"script_fields": {
"foo": {
"script": {
"id": "my_script_id",
"params": {
"things": this.props.things
}
}
}
}
};
}}
```
Contributor guide
Assessment
This issue has not been assessed yet.