Hey all,
I've set up a real-time search using NodeJS and the JavaScript SDK as outlined in the example at:
I've set the earliest_time: 'rt-7s'
and latest_time: 'rt'
and am polling the job's preview regularly for updates.
The problem is that the results I'm getting back are all delayed by about 60 seconds... which seems to defeat the purpose of a real-time search. Am I doing something obviously wrong here, or might there be something else going on with the JavaScript SDK that's causing this delay? (results still come in at the correct rate, but they're always delayed by around a minute)
Thanks in advance!
Based on @sjohnson's answer, @sk4l's comments, and some research of my own, I've sort of figured out what's going on in my environment:
indexed_realtime_use_by_default
in limits.conf was true
.indexed_realtime_disk_sync_delay
which was not set, which means that it was using the default delay of 60 seconds (which is why I saw the 60 second delay I mentioned in the original post).My use case was to see data over the past couple of seconds as it comes in, so doing a non-indexed search could be an acceptable solution in my case.
Based on @sjohnson's answer, @sk4l's comments, and some research of my own, I've sort of figured out what's going on in my environment:
indexed_realtime_use_by_default
in limits.conf was true
.indexed_realtime_disk_sync_delay
which was not set, which means that it was using the default delay of 60 seconds (which is why I saw the 60 second delay I mentioned in the original post).My use case was to see data over the past couple of seconds as it comes in, so doing a non-indexed search could be an acceptable solution in my case.
There is a setting in limits.conf:
indexed_realtime_use_by_default =
* Should we use the indexedRealtime mode by default
* Precedence: SearchHead
* Defaults to false
This might have the effect of delaying your "real time" search results if it is enabled on your search head.
It's disabled by default, so I doubt this is the OP's problem. And in my case, enabling it makes the delay even longer! But that's somewhat normal I think, since this gets you results only after they've been indexed.
The problem is that the real-time search isn't actually real-time!
I am also experiencing the same problem. My results are delayed approximately 30 seconds. Does anyone have a solution?
As a temporary workaround, I'm no longer using a realtime search and am instead doing a one-off query of the last 5 seconds and re-querying every 5 seconds. This feels "hacky", but it's a band-aid solution until this gets sorted out in the JavaScript SDK.
I've also settled for this way for now. My company is going to submit a support request today or tomorrow, so I'll post back if there's a solution.