Filter: ep_facet_meta_use_field

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

Retrieve aggregations based on a custom field. This field must exist on the mapping. Values available out-of-the-box are:

  • raw (default)
  • long
  • double
  • boolean
  • date
  • datetime
  • time

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.3.0
Source:
Returns:

The chosen ES field

Type
string