Let's say I have a search set up in such a way as to guarantee that every doc it returns follows the same data model:
- name (string)
- a (number)
- b (number)
- c (number)
Now let's say I want to display these docs in a data table that has the most basic spreadsheet look-and-feel; e.g., order all the docs by field 'a', then list all the fields for every doc returned.
The best I've been able to do is have my main metric be a Max aggregation on 'a', then split rows with a Terms aggregation on 'name'. That gives me the two of the fields I want. Beyond that I don't know what to do. Splitting rows again doesn't do it because that just makes a different bucket. I already have the docs I want. I just want to display more fields per row.
What next?