| File Name | Number of warnings |
| path/to/foo.cpp | 123 |
| path/to/bar.cpp | 30 |
| path/to/baz.cpp | 15 |
They should be ordered by descending number of warnings.
So far so good with a Lens Table. However I noticed a problem. I have around 10.000 different files, whereas the Table can display at most 1000 rows. The problem is that Kibana will first pick the first 1000 files alphabetically, and then apply the sorting based on warnings. This means that there could be other 9000 files with even more warnings than the first one displayed.
Is there a good way to pick the top 1000 files based on number of warnings, instead of alphabetically?
I realized that I'm also not using a "Quick Function", like "sum", but rather I have my own formula:
In this case a given file might be guarded (owned) by multiple people, so I need to divide by the number of guardians to get the real number of violations in a given file (otherwise it's double-counted).
If I switch over to using the Quick Function "sum", then I can choose "Rank by: Violations" and works as expected. Is there anything I need to do to enable Rank by using a custom formula?
Yes, that works, the problem is that sorting happens after the first N items have been selected alphabetically.
Put it differentely, the top 10 elements of the table should not change if I choose to display 100 or 1000 elements - the top 10 are always the top 10. However I don't observe this behavior - the top 10 elements will be different depending on how many total elements I choose to display.
Lastly, I would like to ask if it's possible to achieve what I want (a Table showing the top N according to custom formula) using some other visualization element? This post is about Lens Table - can I achieve this using a "Aggregation based Table", or does it have the same limitation?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.