• Hello.
    I use your plugin and it was fine.
    But I had an “problemki” that will probably be useful for many users.
    With action I changed the display and data are recorded in Elasticsearch. And when I needed the data to WP I have to go back to them in the database (with 33 queries against 109).
    Here’s an alternative: a file
    /elasticpress/classes/class-ep-wp-query-integration.php
    line: 278 – 282
    $this->posts_by_query[spl_object_hash( $query )] = $new_posts;

    do_action( ‘ep_wp_query_search’, $new_posts, $search, $query );
    Change to
    $new_posts = add_filter( ‘ep_wp_query_search’, $new_posts, $search, $query );

    $this->posts_by_query[spl_object_hash( $query )] = $new_posts;

    So this change can save some time on the script (in my case it is 2 seconds)

    https://ww.wp.xz.cn/plugins/elasticpress/

The topic ‘Action on result posts array’ is closed to new replies.