Forums Forums Search & Filter Pro Working with ElasticPress/ElasticSearch

Viewing 8 posts - 1 through 8 (of 8 total)
  • Anonymous
    #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/

    Anonymous
    #233679

    Yes 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
    #233683

    Did you try adding that filter to your child theme functions.php?

    Anonymous
    #233685

    Yes 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
    #233692

    Did it work? I had advised to integrate it into our query, not the wp_query.

    Anonymous
    #233794

    Hi 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
    #233796
    This reply has been marked as private.
Viewing 8 posts - 1 through 8 (of 8 total)