Support » Plugin: ElasticPress » How do I index fields ffrom ACF plug-in ?

  • Resolved drasleona



    I’m using ACF Pro to create all of my meta data, but Elastic search seems not to recognize them.. Is there a way to add my meta data in the indexation ?



Viewing 2 replies - 1 through 2 (of 2 total)
  • I got this working for me by adding the following to my functions.php file. Just replace the custom_fields with your custom fields.

    /* Custom Fields to Return in the ElasticSearch Results */
    function my_search_filter($query) {
      if ( !is_admin() && $query->is_main_query() ) {
        if ($query->is_search) {
    		$query->set('search_fields', array(
            'meta' => array( 
    Plugin Contributor vhauri


    Per our pinned post on this support forum, we provide all support through Github. You can file issues at

    It seems this issue has been resolved, but if you have additional issues please feel free to file a Github ticket and we will respond.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.