I have an Elasticsearch cluster into which realtime events pour in. What I thought I'd be able to achieve is to show the events as they come in inside a ReactiveList
in ReactiveSearch. This is what I roughly have:
class App extends Component {
render() {
...
return {
<div>
<ReactiveBase
app="my-index"
url="my-secret-es-cluster"
>
...
<ReactiveList
componentId="Results"
dataField="time"
sortBy="desc"
stream
react={{
and: ['SensorX', 'SensorY'],
}}
onData={(res) => <div>{res.time}: {res.some.field_of_interest}</div>}
/>
</ReactiveBase>
</div>
}
}
}
Whenever I make a change in one of the sensors (i.e. filters) I can see the changes reflected in the ReactiveList
component. However, they don't update whenever the database changes, which I had assumed it would do with stream
enabled:
This list can reactively update itself based on changes in other components or changes in the database itself.
Two questions:
- Have I misunderstood how this component is supposed to work, or do I need to do something else before I can see updates to the ES cluster reflected automatically in the results?
- Is it possible to not load results unless a certain sensor is set/selected (e.g. from a
DataSearch
component)?