我有描述N个成分的文档,这些成分属于M << N个较大的对象,这些对象又属于几个组。该文档带有其父对象和组的ID。
现在,我可以轻松地显示每个组或对象中有多少个组件(按术语定义存储桶),但是如何显示这些计数的直方图?
例如,给定以下示例数据:
{'group_id': 1, 'object_id': 1, '_id': 1}
{'group_id': 1, 'object_id': 1, '_id': 2}
{'group_id': 1, 'object_id': 1, '_id': 3}
{'group_id': 1, 'object_id': 1, '_id': 4}
{'group_id': 1, 'object_id': 2, '_id': 5}
{'group_id': 1, 'object_id': 2, '_id': 6}
{'group_id': 1, 'object_id': 2, '_id': 7}
{'group_id': 1, 'object_id': 2, '_id': 8}
{'group_id': 1, 'object_id': 2, '_id': 9}
{'group_id': 1, 'object_id': 2, '_id': 10}
{'group_id': 1, 'object_id': 2, '_id': 11}
{'group_id': 1, 'object_id': 2, '_id': 12}
{'group_id': 1, 'object_id': 3, '_id': 13}
{'group_id': 1, 'object_id': 3, '_id': 14}
{'group_id': 1, 'object_id': 3, '_id': 15}
{'group_id': 1, 'object_id': 3, '_id': 16}
{'group_id': 1, 'object_id': 3, '_id': 17}
{'group_id': 1, 'object_id': 3, '_id': 18}
{'group_id': 1, 'object_id': 3, '_id': 19}
{'group_id': 1, 'object_id': 3, '_id': 20}
{'group_id': 1, 'object_id': 3, '_id': 21}
{'group_id': 2, 'object_id': 4, '_id': 22}
{'group_id': 2, 'object_id': 4, '_id': 23}
{'group_id': 2, 'object_id': 5, '_id': 24}
{'group_id': 2, 'object_id': 5, '_id': 25}
{'group_id': 2, 'object_id': 6, '_id': 26}
{'group_id': 2, 'object_id': 6, '_id': 27}
{'group_id': 2, 'object_id': 6, '_id': 28}
{'group_id': 2, 'object_id': 6, '_id': 29}
{'group_id': 2, 'object_id': 7, '_id': 30}
{'group_id': 2, 'object_id': 7, '_id': 31}
{'group_id': 2, 'object_id': 7, '_id': 32}
{'group_id': 2, 'object_id': 8, '_id': 33}
{'group_id': 2, 'object_id': 8, '_id': 34}
{'group_id': 2, 'object_id': 9, '_id': 35}
{'group_id': 2, 'object_id': 9, '_id': 36}
{'group_id': 2, 'object_id': 9, '_id': 37}
{'group_id': 2, 'object_id': 9, '_id': 38}
{'group_id': 2, 'object_id': 9, '_id': 39}
例如,我想用条形图显示多少个对象具有1,2,3,...组件:
类似地,组大小的分布(以对象或组件的数量来衡量)也会很有趣。
我尝试查找查询语言语法,但是复杂性使像我这样根本不熟悉ELK堆栈的人甚至很难理解要查找的内容。
(我简要地考虑了创建第二个索引作为解决方法,但这显然会导致多面浏览的问题;我真的很希望仍然能够在仪表板中进行交互式过滤。)