Filter: ep_facet_meta_range_use_field

apply_filters( 'ep_facet_meta_range_use_field', $es_field, $meta_field ) → {string}

Retrieve aggregations based on a custom field. This field must exist on the mapping and be numeric so ES can apply min and max to it.

meta.<field>.value is not available, as that throws a Fielddata is disabled on text fields by default error.

Parameters:
Name Type Description
$es_field string

The Elasticsearch field to use for this meta field

$meta_field string

The meta field key

Since:
  • 4.5.0
Source:
Returns:

The chosen ES field

Type
string