add label and es_term on field last_term
This commit is contained in:
parent
a1f52ea9bf
commit
8eefeae7be
|
@ -370,7 +370,11 @@ class Elastic_Press {
|
||||||
// 'total' => count($items_aggregations),
|
// 'total' => count($items_aggregations),
|
||||||
// 'pages' => '0', //TODO get a total of pages
|
// 'pages' => '0', //TODO get a total of pages
|
||||||
'values' => isset($items_aggregations['values']) ? $items_aggregations['values'] : [] ,
|
'values' => isset($items_aggregations['values']) ? $items_aggregations['values'] : [] ,
|
||||||
'last_term' => isset($items_aggregations['last_term']) ? $items_aggregations['last_term'] : ''
|
'last_term' => isset($items_aggregations['last_term']) ?
|
||||||
|
[
|
||||||
|
'label' => explode('.', $items_aggregations['last_term'])[0],
|
||||||
|
'es_term'=>$items_aggregations['last_term']
|
||||||
|
] : ''
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue