Hi,
I am trying to ask how many transactions have a delay greater than 3. The problem is that in one transaction there are more than one log with a the same delay value. Therefore for an example if there is only one transaction and it has a delay of 4 it might have 2 logs of that contains delay = 3. How can I get that the query will give in the value of total 1 and not 2.
Here is my query:
{
"size": 100,
"query": {
"bool":{
"must": [
{ "range":
{
"delay":
{
"gte": 3
}
}
}
]
}
},
"aggs": {
"group": {
"terms": {
"field": "transactionId"
}
}
}
}
PS
the field that unites all logs of a transactionId is called "transactionId"