We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Question about additional select request's query when use sub-level of multilevel-hierarchy

Answered
Heejai asked on April 1, 2022

When the sub-level of multilevel-hierarchy is selected, flexmonster gives one more request which doesn't seem right.

{
"aggs": {
"by": {
"rows": [
{ "uniqueName": "description_state" },
{ "uniqueName": "description_settlement_type" }
]
},
"values": [
{ "field": { "uniqueName": "description_state" }, "func": "count" },
{
"field": { "uniqueName": "description_settlement_type" },
"func": "count"
}
]
}
}

It looks aggregation doesn't make sense. In this case, they're gonna be 1.
Could you explain what this additional select request for?

1 answer

Public
Maksym Diachenko Maksym Diachenko Flexmonster April 1, 2022

Hello, Heejai!

Thank you for your question.

We would like to kindly explain that if the level from which to show the hierarchy is specified in the slice, an additional /select request is initiated for loading the required levels. This /select request is needed to extract the members from the specified level.

The "func": "count" property is needed to retrieve the quantity of labels below a certain hierarchy level. If the returned value is >= 1, then there will be a drill down label, as on the first row of the attached image. If 0, there won't be the drill down label (as shown on the second row).

Hope you will find this information helpful.

Best Regards,
Maksym

Please login or Register to Submit Answer