A problem with query searching using JSON

Hey guys, I am running this code to the value of the field as I mentioned below over the range that I have also mentioned below. For some reasons, it shows me that there is no query registered for filtered and the code does not work. If anyone has any idea with this, please do give out some help.

POST filebeat*/_search
{
"query": {
"filtered": {
"query": {
"match": {
"query": "aAZbOG0BfQqr92KY_bua",
"field": "_id"

      }
    },
     "filter": { 
        "range" : { 
          "timestamp":{
            "gte": "1568591458676"
          
  }
}

}

}
},
"_source": ["_id", "ecs.version", "timestamp"]

}

Hi @resun

can you please format your query using the Preformatted text option so it's a bit more readable?

Seems that you are issuing a wrong ES query. I suggest you to check this https://www.elastic.co/guide/en/elasticsearch/reference/7.3/query-filter-context.html to see how you can write a query with a filter

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