We have a transform that creates aggregation based on userId and clientID from a source index and write to a destination index. We've noticed the destination index is missing data it should have even after waiting 10+ minutes (sync frequency is set as 1m with sync delay also 1m). We have some data from similar timerange in destination while others are missing. What could the reason for missing data?
Below is transform definition (I renamed index name for sharing)
{
"source": {
"index": "source_index",
"query": {
"bool": {
"must_not": [
{"term": {"userId": ""}}
]
}
}
},
"dest": {
"index": "dest_index",
"pipeline": "add_timestamps_v2"
},
"pivot": {
"group_by": {
"client_id": {
"terms": {
"field": "client_id"
}
},
"user_id_hash": {
"terms": {
"field": "userId"
}
}
},
"aggs": {
"devices": {
"terms": {
"field": "device_id"
},
"aggs": {
"users": {
"terms": {
"field": "userId"
}
}
}
}
// more aggregations here..
}
},
"frequency": "1m",
"sync": {
"time": {
"field": "updated_at",
"delay": "60s"
}
}
}