ElasticsearchJS Issue: query returns no hits

I'm currently creating a website to monitor readings from various equipment (not using Kibana for this for a variety of reasons), and I've run into an issue with my JavaScript query.

When the script executes the search, it doesn't return any hits. However, the link in the "POST" statement the search creates has all the hits I want. Further, the query had worked up until about half an hour ago, and I cannot figure out why it suddenly stopped working in the script.

For reference, here's the query:

var promise = client.search({
index: "chamber-data",
type: [this.props.chamber],
size: 1000,
scroll: "30s",
sort: ["_doc"],
_source: ["@timestamp", "datetime", [...this.props.fields]],
body: {
query: {
bool: {
filter: {
range: {
datetime: {
lte: "now",
gte: "now-12H"
}
}
}
}
}
}
}).then(this.process_promise, this.handle_error);

And here's the response in the console of my development site"

{
"_scroll_id": "DnF1ZXJ5VGhlbkZldGNoBQAAAAAAAAADFlZYTEJLYW12UUFTaWowMllJZVcyalEAAAAAAAAABBZWWExCS2FtdlFBU2lqMDJZSWVXMmpRAAAAAAAAAAUWVlhMQkthbXZRQVNpajAyWUllVzJqUQAAAAAAAAAGFlZYTEJLYW12UUFTaWowMllJZVcyalEAAAAAAAAABxZWWExCS2FtdlFBU2lqMDJZSWVXMmpR",
"took": 16,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}

Does anyone have any thoughts, or has anyone ever encountered something like this? I'm at a loss as to what to do about it...

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.