Merge branch 'hotfix/0.16.1' of https://github.com/tainacan/tainacan into hotfix/0.16.1
This commit is contained in:
commit
962867c2dc
|
@ -48,6 +48,11 @@ class Elastic_Press {
|
|||
add_filter( 'ep_config_mapping', [$this, 'elasticpress_config_mapping'], 10, 1 );
|
||||
add_filter( 'ep_post_sync_args', [$this, 'ep_post_sync_args'], 10, 2 );
|
||||
|
||||
add_filter( 'ep_formatted_args', function ( $formatted_args ) {
|
||||
$formatted_args['track_total_hits'] = true;
|
||||
return $formatted_args;
|
||||
} );
|
||||
|
||||
// add_action('ep_add_query_log', function($query) { //using to DEBUG
|
||||
// error_log("DEGUG:");
|
||||
// error_log($query["args"]["body"]);
|
||||
|
@ -445,7 +450,7 @@ class Elastic_Press {
|
|||
if (!empty($filter['include'])) {
|
||||
$custom_filter_include = $custom_filter;
|
||||
$custom_filter_include['bool']['must'][] = ["bool" => [ "must"=> [ [ "terms" => ["$field.term_id" => $filter['include'] ] ] ] ] ];
|
||||
$terms_id_inlcude = \implode($filter['include'], ",");
|
||||
$terms_id_inlcude = \implode( ",", $filter['include']);
|
||||
$aggs[$id.'.include'] = [
|
||||
"filter" => $custom_filter_include,
|
||||
"aggs" => array(
|
||||
|
@ -479,7 +484,7 @@ class Elastic_Press {
|
|||
$custom_filter_include = $custom_filter;
|
||||
$custom_filter_include['bool']['must'][] = ["bool" => [ "must"=> [ [ "terms" => ["$field" => $filter['include'] ] ] ] ] ];
|
||||
$meta_label = explode(".",$id)[1] . '.' . explode(".",$id)[2];
|
||||
$meta_id_inlcude = "'" . \implode($filter['include'], "','") . "'";
|
||||
$meta_id_inlcude = "'" . \implode("','", $filter['include']) . "'";
|
||||
$aggs[$id.'.include'] = [
|
||||
"filter" => $custom_filter_include,
|
||||
"aggs" => array(
|
||||
|
|
Loading…
Reference in New Issue