I would like to use the Elastic Search API in order to get information on a parameter I have in one of my index.
In concrete terms, I would like to know if there have been any hits for a particular client . ( parameter called "data.client") in the last 5 minutes calling the API.
Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.
Or use markdown style like:
```
CODE
```
This is the icon to use if you are not using markdown format:
There's a live preview panel for exactly this reasons.
Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.
You should try a simple _search using a bool query with a must array which contains a term query and a range query.
If you don't know how to do it, please share a minimal reproduction script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.
A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.
The only way to debug this is by reproducing your error. So please provide a script as I mentioned earlier.
A script is something we can copy/paste in Kibana dev console and reproduce the problem.
In the meantime, you can try few things to check where the error is coming from.
Run:
Thanks very much for your help, I've found the problem, this part :
was the origin of the problem only because an @ was missing in @timestamp.
It's working now but there now another problem :
When I run my script at 15:31 for example, I'm only getting hits that have a @timestamp during the 15:26 minute, (31-5 = 26) but I don't get any hits between 15:26 and 15:31. It should be related to
"timestamp": {
"gte": "now-5m/m",
"lte": "now"
but I don't know what is not correct with this. I'll check again the documentation about date range but if you have any idea of what could be the problem I would be glad to hear it.
The only way to debug this is by reproducing your error. So please provide a script as I mentioned earlier.
A script is something we can copy/paste in Kibana dev console and reproduce the problem.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.