Elasticsearch integration
-
Hi,
I’m trying to integrate elasticsearch into our website, and to replace the default wordpress search function with elasticsearch. We are using a plugin called Elasticpress;
https://github.com/10up/ElasticPress#wp_query-and-the-elasticpress-query-integration
It has ready functionality for bbpress and woocommerce and I’d very much like to add elasticsearch functionality to WP Advert in production because I know after a short period of time, wordpress search will be bogged down and take minutes to complete. I’ll much appreciate if you can show me the way to replace the search function for WP Advert to something like;
new WP_Query( array(
‘s’ => ‘term search phrase’,
‘search_fields’ => array(
‘post_title’,
‘post_content’,
‘post_excerpt’,
‘taxonomies’ => array( ‘category’, ‘post_tag’ ),
),
) );I have taken this example from the Elasticpress plugin documentation on Github. The “s” term adds the functionality for elasticsearch, while the Elasticpress function is in use. But I don’t know where to hook this into. Thanks very much for your help, really appreciate it!
- The topic ‘Elasticsearch integration’ is closed to new replies.