Forums Forums Search & Filter Pro Working with ElasticPress/ElasticSearch

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