Hi Archana,
Thanks for your response.
First of all I would like to explain you what is our goal, just in case we aren't resolving our requirement properly. What we are trying to do is showing a table with individual document data, based on a filter selected previously by user (filter by "transactionId" field) that should return a bunch of documents: usually between 1 and a few tens, in extraordinary cases they can reach a few hundred.
Our first solution was inserting a saved search into the dashboard and it shows all data correctly, but as I said in a previous post, saved searches don't allow costumizing column labels and our customer don't like it because they aren't consistent with the rest of the dashboard (and other dashboards).
As a workaround we have created a data table visualization that define aggregations and metrics for all fields that must be shown. The first aggregation bucket ("treeMap" field) is a unique identifier for documents with the same "transactionId" value, so it ensures that each row of the table is an individual document.
Below is the definition of the visualization. Note that some aggregation buckets are disabled and columns "Evento" and "Servicio" has data for all rows,
Then we enable the bucket aggregation by "targetComponentDesc". This field is not informed in document of first row (document with treeMap:1), but after enabling this aggregation columns "Evento" and "Servicio" aren't neither informed in first row:
If we also enable aggregation by "flow" field (this field isn't informed in any document for this "transactionId") "Evento" and "Servicio" aren't neither shown in any row:
Then we disable aggregation by "flow" and enable aggregation by "view". This field is informed in 6 documents with an empty string. Again "Evento" and "Servicio" columns are only shown for documents that has the "view" field.
The search query is simple:
{
"query": {
"match": {
"transactionId": {
"query": "0202eee1-71f5-47c6-901c-c1152ac1687d",
"type": "phrase"
}
}
}
}
I've tried to insert here the sample data used for this example, but then the post exceeds maximum allowed size. If you need to see row data I can send you by any other way.
I hope this information help you understand our issue.
Thanks,
Joaquin