The forums are closed and will be removed when we launch our new site.
Looking for support? You can access the support system via your account.
Forums › Forums › Search & Filter Pro › Working with ElasticPress/ElasticSearch
Tagged: elasticpress, ElasticSearch, indexing
- This topic has 7 replies, 2 voices, and was last updated 4 years, 7 months ago by Trevor.
-
Chris Moore(Private) February 11, 2020 at 2:58 pm #233676
I am working on getting this plugin to work with ElasticPress based on the ep_integrate filter. I am running a Woocommerce Site with nearly 47,000 products and each product has variations along with custom fields. I am trying to use this plugin to filter the products based on the values of the custom fields.
One problem I am having is that the indexing is taking forever. Like more than a day. I have indexing set to fast with not much improvement. Hosting is a cloudways server with decent memory (4GB). I have tried other search plugins like facetwp and the indexing only takes a few minutes. The problem is they don’t integrate with elasticpress. The long indexing is also annoying when I a working with the plugin. If I add a new filter then want to see how it is output it rebuilds the index every time I update it.
If I am going to be using this with elasticpress why does it need to build its own index? Is there a way to bypass this?
One I get this working is there a way to confirm it is connecting to ElasticSearch? I am currently testing this on a custom query page to make sure it works. Here is that url: https://wordpress-301924-1154451.cloudwaysapps.com/test/
Trevor Moderator(Private) February 11, 2020 at 3:02 pm #233677Chris Moore(Private) February 11, 2020 at 3:12 pm #233679Yes I have seen that post and several others on here. I am running a self hosted EaslticSearch setup using elasticpress. I have built the elastic index on my server and my general search works really fast with Elasticpress I am just now trying to add filters to it.
Trevor Moderator(Private) February 11, 2020 at 3:14 pm #233683Did you try adding that filter to your child theme functions.php?
Chris Moore(Private) February 11, 2020 at 3:42 pm #233685Yes I integrated it into a custom query:
<?php echo do_shortcode('[searchandfilter id="163524"]'); ?> <?php $args = array( 'post_type' => 'product', 'orderby' => 'title', 'order' => 'asc', 'posts_per_page' => 10, 'ep_integrate' => true); $args['search_filter_id'] = 163524; $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); ?> <h2><?php the_title();?></h2> <p><?php the_content();?></p> <p><?php $sku = get_post_meta( get_the_ID(), '_sku', true ); echo ( $sku ); ?></p> <?php $price = get_post_meta( get_the_ID(), '_price', true ); ?> <p><?php echo wc_price( $price ); ?></p> <br/> <?php endwhile; ?>
Trevor Moderator(Private) February 11, 2020 at 4:06 pm #233692Did it work? I had advised to integrate it into our query, not the wp_query.
Chris Moore(Private) February 12, 2020 at 4:33 pm #233794Hi Trevor. So I think the problem for me right now is that it is taking FOREVER to index. It says I have 49,000~ posts and I started indexing yesterday and am only at 44%. This is on a Cloudays server with 4GB RAM on a Digitial Ocean instance.
If these plugin is going to work with ElasticPress I think there needs to be a way around the caching. Most people using ElasticPress are going to have a large number of posts otherwise they would just use the default search that comes with WordPress.
Is there any way around the caching or a way to speed it up? I have set it on the fastest setting but it still isn’t helping.
Trevor Moderator(Private) February 12, 2020 at 4:37 pm #233796This reply has been marked as private. -
AuthorPosts
The forum ‘Search & Filter Pro’ is closed to new topics and replies.