I need select categories for breadcrumbs from solr, where categories will be ordered by parent like this:
Super-parent > Child A of super-parent > Child B of child A > ...
So for instance this is our solr documents:
[
{
"parent_id": 2222,
"name": "Category A",
"id": 1111
},
{
"parent_id": 3333,
"name": "Category B",
"id": 2222
},
{
"parent_id": 4444,
"name": "Category C",
"id": 3333,
}
]
and I need write query to select categories in this order based on field parent_id, which points to another category:
Category C > Category B > Category A
Is it possible? Thank you.