Elasticsearch Search Queries

Hi ,
I want to search in DEV TOOLS query :
"((STATUS:Stop AND STIME>180) OR STATUS:Start)" on last 15 minuts
, in kibana-discover worked excellent.
it is contain AND, OR and condition > on integer field STIME bigger than 180
I tried this ,but got only "Start's" , Stop condition didn't find at all:

get /users-*/_search 
{"_source" : ["USERNAME","STATUS","STIME"], "size" : 500, "query" : { "bool" : { "must" : [ { "query_string" : { "query" : "((STATUS:Stop AND STIME>180) OR STATUS:Start)" } } , { "range" : { "@timestamp" : { "gte" : "now-15m/m", "lte" : "now/m" } } } ] } } }

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:


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.

Could you provide a full recreation 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 will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.


Not sure. Where is the "full recreation script"?

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