WPSolr logo
Search
Close this search box.

Tutorials guides for WordPress & WooCommerce

Wordpress Ajax (live) search

How to add Ajax (live) search to WordPress

In today’s world, every popular website is equipped with some form of Ajax search. allowing users to experience real-time updates and dynamic search suggestions as they type. This seamless interaction enhances user engagement and provides instant access to relevant information, ensuring a smoother and more efficient browsing experience overall. So how could you add this search feature to your WordPress website. Well this step-by-step guide will teach you.   What is Ajax search Example of a autocomplete Ajax search in WordPress using WPSolr plugin. Ajax search consists of returning results in real-time as a user enters text in a search. It will simply place the clickable results under the aforementioned search bar and differentiates itself from regular search by not reloading the page. This seamless

How to (Easily) Configure Elasticsearch on WordPress

One of the best ways of improving user experience on your WordPress websites is to have a speedy and accurate search. While the default search can be quite effective on websites with limited amounts of data, it’s speed can become problematic (slow) as traffic and data increases. This is why, in this case, you should replace your WordPress search with a high performance search engine. But where do you start? Elasticsearch is an easy choice, since it is probably the one with the best price to performance ratio.   What is Elasticsearch ? While the default WordPress search (and many other search plugins such as Relevanssi or Ivory search) use simple SQL queries to find matching posts in the WP database, Elasticsearch is optimized for

vespa logo

Vespa error : “feed: got status 507”

When trying to deploy your Vespa application and index your documents, you could receive the following error :   feed: got status 507 ({"pathId":"/document/v1/mynamespace/music/docid/hardwired-to-self-destruct","id":"id:mynamespace:music::hardwired-to-self-destruct","message":"[UNKNOWN(251009) @ tcp/a9a1e3304702:19112/default]: ReturnCode(NO_SPACE, External feed is blocked due to resource exhaustion: in content cluster 'music': disk on node 0 [a9a1e3304702] is 93.9% full (the configured limit is 75.0%). See https://docs.vespa.ai/en/operations/feed-block.html) "}) for put id:mynamespace:music::hardwired-to-self-destruct: not retryable   This is because the disk space is almost full (in this case 93.9%). When the nodes reach a certain limit, the nodes block external write operations.   By default Vespa sets it’s disk space limit at 0.75 (75%).  You can increase it by adding the following lines to the ‘services.xml’ file in your Vespa application package, more precisely inside the ‘<content>’ tag :  

Recombee x PHP

Build a recommendation system using Recombee and PHP

Recombee is a recommender that offers personalized search & recommendations for e-commerce, media, and other industries. It uses machine learning algorithms to analyze user behavior, preferences, and interactions in order to provide relevant and accurate suggestions. With Recombee, businesses can improve their customer experience by offering personalized product recommendations based on each individual’s browsing history, purchase history, and interests. This helps increase customer engagement and satisfaction, ultimately leading to higher sales and revenue.   If you wish to learn more about Recombee, you can check out our full review.   In this guide, we will learn how to build a recommendation system using Recombee and PHP.   Getting started with Recombee and initializing the project   Create a Recombee account at the following : https://oauth.recombee.com/

Image of a reql query

ReQL – How to create business rules for Recombee (with examples)

Recombee is a personalized search & recommendations provider. One of it’s major advantages is that Recombee gives the user the option of modifying the queries from the backend using scenarios and business rules. For example, if you have a Woocommerce website with WPSolr & Recombee, you can hide certain specific items without needing to access the WordPress website, only the Recombee dashboard.   You can then construct these business rules using ReQL, a Recombee exclusive Query Language that allows total freedom. You can learn more about it from the official Recombee documentation.   How to create business rules   Create business rule Click on the ‘Business Rules’ tab in the Recombee dashboard. Click on the ‘+ Create Rule’ button.   Set the title in the

How to use Weaviate with any Huggingface vectorization model

For more info about Weaviate,  check out our documentation.   If you’ve ever wanted to use Weaviate but were worried that you couldn’t use the most efficient or relevant vectorization model you want, I have just the thing for you. In this notebook/guide, I have detailed the different steps and code needed to setup Weaviate with any Huggingface vectorization model. TLDR Choose from a wide selection of Huggingface models using the official rankings page. Create your own transformers inference container to be used by Weaviate to vectorize the data. Learn how to add your chosen Huggingface model.. Startup the containers and create the class that will use your new vectorizer model. Send the data to the Weaviate that will now be automatically vectorized by the custom model.

Elasticsearch indexing: Tips for getting it right

Introduction Elasticsearch is a powerful open-source search engine that provides fast and scalable indexing capabilities. When it comes to indexing data in Elasticsearch, there are a few tips and best practices that can help you get it right. In this post, we will explore these tips and also look at how the PHP client for Elasticsearch can be used to index data. Additionally, we will discuss the benefits of using WPSOLR, a WordPress plugin that integrates Elasticsearch to enhance search functionality. Elasticsearch Indexing Tips 1. Define a Suitable Data Model: Before indexing data, it is crucial to define a suitable data model that represents the information you want to search. This includes identifying the fields and their respective data types. 2. Optimize Mapping: Elasticsearch allows

How to troubleshoot Elasticsearch

Introduction Elasticsearch is a powerful distributed search and analytics engine that is widely used for storing, searching, and analyzing large volumes of data. However, like any other technology, Elasticsearch can encounter issues and require troubleshooting to ensure optimal performance. In this post, we will explore some common troubleshooting techniques when working with Elasticsearch.   Troubleshooting Elasticsearch 1. Check Elasticsearch Cluster Status: The first step in troubleshooting Elasticsearch is to check the cluster status. You can use the Elasticsearch PHP client library to query the cluster health and obtain information about individual nodes, indices, and their status. Here’s an example of how you can use the PHP client to obtain the cluster health: require 'vendor/autoload.php'; $client = Elasticsearch\ClientBuilder::create()->build(); $response = $client->cluster()->health(); // Check the cluster status

Elasticsearch in the cloud: The pros and cons

Introduction Elasticsearch is a popular search and analytics engine that is widely used for its scalability, speed, and ease of use. It is designed to handle large amounts of data and perform real-time searches and analytics on that data. When it comes to deploying Elasticsearch, one option that many organizations consider is deploying it in the cloud. There are several cloud providers that offer Elasticsearch as a managed service, such as Amazon Web Services (AWS) Elasticsearch Service, Google Cloud Elasticsearch, and Elasticsearch Service on Elastic Cloud. In this post, we will explore the pros and cons of using Elasticsearch in the cloud, and also provide some code examples using the PHP client for Elasticsearch. Pros of Elasticsearch in the cloud 1. Scalability: One of the

Using Elasticsearch for creating dynamic facets in WooCommerce

Introduction Elasticsearch is a powerful search and analytics engine that can be used to enhance the search capabilities of your WooCommerce website. One of the key features of Elasticsearch is the ability to create dynamic facets, which allow users to easily refine their search results based on various attributes. In this post, we will explore how Elasticsearch can be used to create dynamic facets in WooCommerce and how you can implement it using the PHP client.   Using Elasticsearch for Dynamic Facets in WooCommerce Facets in Elasticsearch are essentially filters that allow users to narrow down their search results by applying certain criteria. For example, if you are running an online store and have products with attributes such as color, size, and brand, you can

Elasticsearch and the world of machine learning

Introduction Elasticsearch is a powerful, open-source search engine built on top of the Apache Lucene library. It is commonly used to store, search, and analyze large volumes of data. The world of machine learning, on the other hand, is concerned with creating algorithms that can learn from and make predictions or take actions based on data. Combining Elasticsearch and machine learning can be a game-changer in terms of the insights and actions that can be derived from data. In this post, we will explore some ways in which Elasticsearch can be leveraged for machine learning tasks and how the two technologies can complement each other. Using Elasticsearch for Machine Learning Elasticsearch provides several features and functionalities that can be beneficial for various machine learning tasks.

Using Apache Solr facets to enhance search on WooCommerce

Introduction When it comes to improving the search functionality on an eCommerce platform like WooCommerce, Apache Solr is a powerful tool that developers can utilize. Apache Solr is an open-source search platform built on Apache Lucene, which provides advanced search capabilities and high-performance indexing. One feature of Apache Solr that can greatly enhance the search experience is facets. Facets allow users to narrow down search results by applying filters based on specific attributes or fields. In this post, we will explore how to use Apache Solr facets to enhance search on WooCommerce and provide an improved user experience.   Using Facets with Apache Solr To begin using Apache Solr facets with WooCommerce, you need to have Apache Solr up and running and properly configured. Once

Elasticsearch vs. Solr: Which one is better?

Introduction Elasticsearch and Solr are two of the most popular and widely-used search engines in the field of information retrieval. Both offer powerful features and are capable of handling large-scale search applications efficiently. However, when it comes to choosing between Elasticsearch and Solr, it can be challenging to determine which one is better suited for your specific use case. In this post, we will explore the differences between Elasticsearch and Solr, compare their key features, and discuss how WPSOLR can help enhance your search capabilities.   Elasticsearch Elasticsearch is a real-time search and analytics engine built on top of the Apache Lucene library. It is known for its distributed architecture, scalability, and speed. One of the key advantages of Elasticsearch is its ability to handle

Using Algolia to create lightning-fast faceted search in your WordPress and WooCommerce store

Introduction: Faceted search is an essential feature for any e-commerce website. It allows users to refine their search results by applying filters to specific attributes or categories. Algolia is a powerful search engine that provides lightning-fast faceted search capabilities. In this post, we will learn how to integrate Algolia into your WordPress and WooCommerce store to enhance the search experience. Getting Started with Algolia: To start using Algolia, you need to create an account and obtain the necessary API credentials. Once you have your credentials, you can install the Algolia plugin for WordPress or use the Algolia PHP client directly. Using Algolia with the PHP Client: To use Algolia in your WordPress or WooCommerce store, you can utilize the Algolia PHP client. Here’s an example

How to set up an Elasticsearch cluster

Introduction If you’re looking for a distributed, open-source search and analytics engine, then Elasticsearch is your best bet. It can help you with structured and unstructured data, including HTTP web logs, machine-generated data, and social media. It’s fast, reliable, and scalable, making it a popular choice for big data search applications. In this post, we’ll show you how to set up an Elasticsearch cluster. What is Elasticsearch? Elasticsearch is a distributed search engine that uses Lucene for full-text indexing and search. It’s written in Java and uses the Apache Lucene library to provide fast and accurate indexing of large amounts of data. Elasticsearch is designed to be scalable, fault-tolerant, and easy to use. How to set up an Elasticsearch cluster To set up an Elasticsearch

Creating custom Elasticsearch queries for WooCommerce

Introduction When it comes to optimizing the search experience on your WooCommerce website, Elasticsearch is the best search engine that you can use. Elasticsearch is a fast, scalable, and powerful solution that can improve the search experience on your WooCommerce website dramatically. However, there is a lot of work that goes into creating custom Elasticsearch queries for WooCommerce. In this post, we will walk you through the process of creating custom Elasticsearch queries for WooCommerce. Creating Custom Elasticsearch Queries for WooCommerce The first step to creating custom Elasticsearch queries for WooCommerce is to install Elasticsearch on your server. Once you have Elasticsearch installed, you can start building custom queries using the Elasticsearch API. The easiest way to do this is to use the Elasticsearch PHP

How to install Elasticsearch on Windows

Introduction Elasticsearch is a powerful open-source search and analytics engine that enables you to store, search, and analyze large volumes of data quickly, reliably, and in near-real-time. With Elasticsearch, you can perform complex searches, visualize data, and create dashboards. Elasticsearch is written in Java and is extremely scalable and easy to use. If you are using Windows, then you can install Elasticsearch on your system and start using it for your project. In this post, we will guide you through the steps for installing Elasticsearch on Windows. Step 1: Download and Install Java JDK Before you start the installation of Elasticsearch, you need to download and install the Java Development Kit (JDK) on your system. Elasticsearch requires Java 8 or later version to run, so

Implementing custom ranking in Elasticsearch for WooCommerce

Introduction Elasticsearch is a powerful open-source search engine that can be used with many different applications. WooCommerce is one such application and is known as one of the most popular eCommerce platforms. By default, WooCommerce uses a relevance ranking system to sort the search results. However, sometimes businesses require different ranking systems, and hence, being able to implement a custom ranking system within Elasticsearch can be highly advantageous. In this post, we will discuss how you can implement custom ranking in Elasticsearch for WooCommerce with PHP client. We will also talk about how WPSOLR, a popular WordPress plugin, can help with that. Implementing Custom Ranking in Elasticsearch for WooCommerce To implement a custom ranking in Elasticsearch for WooCommerce, we need to understand how Elasticsearch handles

Installing Apache Solr

Introduction Apache Solr is an open-source search platform that allows you to create powerful search features for your web applications. It is built on top of the Apache Lucene project and provides advanced search capabilities such as full-text search, hit highlighting, and faceted search. In this tutorial, we will guide you through the process of installing Apache Solr on your system. Installation of Apache Solr 1. Download and install Java on your system if it is not already installed. Set up JAVA_HOME and PATH variables in your system. 2. Go to the Apache Solr download page and download the latest version of Apache Solr. 3. Extract the contents of the downloaded file into a directory on your system. 4. Start the Apache Solr server by

Managing Multilingual WooCommerce Stores with Weaviate

Introduction In today’s globalized world, businesses are expanding their reach beyond borders, catering to customers from different linguistic backgrounds. This has created a need for multilingual support in e-commerce platforms like WooCommerce. Managing a multilingual WooCommerce store can be a complex task, but with the help of powerful tools like Weaviate, it becomes much easier. Weaviate is an open-source knowledge graph that can be used to build intelligent applications. In this post, we will explore how to manage multilingual WooCommerce stores using Weaviate and provide some example code using the PHP client.   Managing Multilingual WooCommerce Stores with Weaviate 1. Setting up Weaviate: The first step is to set up Weaviate on your server. You can follow the official documentation to install and configure Weaviate

vespa logo

The shortest explanation on how to build embeddings for queries and documents at scale with Vespa ! 😍

1. Download and convert to onnx any Hugging Face sentence transformer model(s) 2. Declare the model(s) with an id in services.xml => id=”bert” 3. Use the model(s) id to declare tensor field(s) built from any text field(s) => indexing: input myTextField | embed bert 4. Deploy the application package on docker or Vespa cloud 5. Use the model(s) id to embed the query text => input.query(myEmbedding)=embed(bert, “Hello world”) 6. Use ranking(s) to build mixed BM25/ANN expressions Read the post from Vespa blog: https://blog.vespa.ai/text-embedding-made-simple/ WPSOLR with Vespa: https://www.wpsolr.com #wpsolr #vespasearch #vectorsearch #woocommerce #wordpress

integrate your Opensearch server using the PHP client

Should you Use Elasticsearch PHP Client With OpenSearch? Opensearch PHP guide

Historically, you had to use the Elasticsearch PHP client, but as of november 2021 that is not the case anymore. The official Opensearch PHP client is now available.   As an official opensearch partner, we just had to explain the benefits of the Opensearch PHP client and provide a comprehensive guide on setting up a PHP application with it.   Opensearch is an open-source search engine designed for scalable and high available applications. It offers features such as full-text search, faceted search, vector search and many more.   Why use the Opensearch PHP client   Using the OpenSearch PHP client offers several advantages over using cURL directly. First, the PHP client provides a more simple and user-friendly interface for interacting with the OpenSearch API, reducing

Fix Elasticsearch error “Result window is too large”

Fix for WPSOLR only The fix described on this post, involving the index settings,  does not seem to work anymore with recent versions of Elasticsearch. As a workaround, we added a new option in WPSOLR’s admin screen 2.1 to set the parameter ‘track_total_hits‘ to ‘true’ for all queries. You can follow the official fix for Result window is too large. The error In this post, we are solving the following Elasticsearch error: "Fatal error: Uncaught Elasticsearch\Common\Exceptions\ServerErrorResponseException: {“error”:{“root_cause”:[{“type”:”query_phase_execution_exception”,”reason”:”Result window is too large, from + size must be less than or equal to: [10000] but was [11328]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting.”}],”type”:”search_phase_execution_exception”,”reason”:”all shards failed”,”phase”:”query”,”grouped”:true,”failed_shards”:[{“shard”:0,”index”:”xxxxx”,”node”:”xxxxxx”,”reason”:{“type”:”query_phase_execution_exception”,”reason”:”Result window is

One million listings with MyListing Theme, Elasticsearch, and WPSOLR

Last websites equipped with MyListing, WPSOLR and Elasticsearch cartochrome.com Health index with 1,000,000 listings emailexpert.com Directory for expert vendors, agencies & consultants findopendays.com Directory with open days at Universities & Colleges   WPSOLR + MyListing Theme + Elasticsearch This video suppose you already have installed a local Elasticsearch. You will see how to setup WPSOLR PRO to speedup the MyListing search, including geolocation, with: MyListing Theme Your local Elasticsearch  What is the “MyListing Theme” extension ? MyListing is made for huge listings searches, including geolocation.  As soon as the number of listings grows, so is the time to display search results to visitors. WPSOLR PRO transparently replaces MyListing searches and sorting with Elasticsearch searches. The best way to speed up listing searches, whatever the number

How to replace a VMWare Fusion Pro VM in a Vagrant deployment?

The purpose of this tutorial is to show all the steps necessary to replace a VMWare fusion PRO VM from an existing Vagrant deployment. My story is a bit strange. My VM started to increase in size a long time ago, so much that it threatened to fill all my disk space (260 Gb of VM, 500 Gb of disk, 30 Gb free remaining !). So, each few days I had to search for big files to delete. It worked for a long time, but the threat became too important, and finally I decided to solve the problem once and for all. In this document, I describe in great details what took me 2 full days of painful research, trials, and mistakes. Below are the

Best practice to Import data in WordPress & Elasticsearch

Imagine a WooCommerce site with no products yet, ready to import thousands of products. WPSOLR is then activated, and a new Elasticsearch index created. A first import is executed to import tens of thousands of products. More imports will follow to add more products, but also to delete or update some products previously imported. How can we optimize the indexing performance? How can we also prevent the Elasticsearch index being desynchronized from the WooCommerce database? Deactivate the real-time indexing Below is a schematic of how to deactivate real-time indexing during imports:   Detailed explanations By default, WPSOLR is activated with a feature called “Real-time indexing”. This feature will insert/update/delete a document in the Elasticsearch index immediately after the corresponding product (or any other post type)

Manage Elasticsearch and Solr analyser configuration files

Some search engine Analysers come with a “file path” parameter, instead of a simple value parameter (bool, string, list, …). But how and where to upload the parameter file is often a bit of a puzzle. Especially if, like myself, one use several search engines. So, I decided to write a small “how to” for Solr and Elasticsearch. Each use case is documented with the cURL or the shell commands required to replicate the tutorial on your own environments. The tutorial environment is a Vagrant Linux Ubuntu 16.04.6 LTS, with Solr 8.1.1 and Elasticsearch 7.3. The tutorial will be based on a frequently used Token filter, the synonyms filter. Let’s connect first to the search engine server with ssh (here, a vagrant machine on MacOS):

Avada vs Enfold

Introduction If you are reading this then you must be looking for the perfect WordPress theme to use on your website and are yet to decide whether to go with the Avada or Enfold WordPress theme. This is quite understandable as it is a daunting task choosing the right WordPress template. Both themes are so powerful and well-built that at first glance they almost look identical in both presentation and functionality. So, how do you choose? Avada vs Enfold We aim to help you decide by breaking down the primary aspects that make a quality theme and finding out which theme is right for your needs. 100,000 products with Avada vs Enfold? Why not compare both themes in the most extreme situation, with tens of

Avia Layout Editor Loading and Integration Errors

Introduction The Enfold theme (and accompanying Avia Layout Editor) is a very powerful and versatile theme. But like all themes, you can also run into problems when using it, especially if you have default hosting restrictions and conflicting script command on your website. Enfold Theme and Avia Layout Editor Errors The Enfold Theme and Avia Layout Editor can display errors in various ways. The most common ones are the infinite loading screen, white text and missing buttons in the virtual editor, and problems integrating with various plugins. You may even be unable to switch to the layout editor using the button on the page editor. What Causes Enfold Theme Errors? Enfold and Avia Builder errors can usually be traced to one of the following reasons:

Solved: Avada Theme – 500 Internal Server Error!

The 500 internal server error in your WordPress site with an active Avada theme is deadly.  But you can solve it with three simple checks detailed below: Memory check .htaccess check Incompatibility check Introduction The “error 500 internal server error” can be represented in different ways depending on your hosting platform but it most often looks like this: Today, we’ll be looking at how to diagnose and fix the 500 internal server side error when using the Avada theme and Fusion Builder. We will go through several steps to help you get your site back online.   What is error 500 (“500 internal error”) and What Triggers It? There are only a few error codes that your website can use to show that there is

Impreza theme

Setting Up Impreza Theme in WordPress

Live Impreza search and filter with 100K products Before we start the tutorial, perhaps you’d like to try our live demo of Impreza installed with our WooCommerce search & filter plugin, loaded with 100 thousand products.   Things You Need Before Installing WordPress Before you install WordPress, first you will need a domain name and a good web hosting company that knows WordPress. I highly recommend that you use BlueHost you get the best performance per $, a free domain, a good discount off their hosting plan and a free SSL Certificate amongst other promotional tools. Bluehost is also an officially recommended hosting provider of WordPress. You can also take a look at Siteground     Installing WordPress (Bluehost one click install) If you decide to use another hosting provider,

How to fix Divi Builder Continuous Loading, Opening, Loading or Timeout Issues

Introduction The Divi team is constantly releasing really awesome interface updates for their core theme to ensure it is faster, more intuitive and greatly enhances your website building experience. Unfortunately, the Divi theme is plagued with a bug that makes the back-end Divi Builder and the front-end Visual Builder unworkable on most browsers due to several limitations in its local storage. In this guide, we will be showing you some tips and tricks to help you fix the problem. Divi Builder Continuous Loading The Divi Builder infinite loading issues occurs when trying to edit pages and may affect the front-end visual builder or the back-end builder. Divi Builder Continuous Loading Diagnosis Due to Divi’s comprehensive nature, it is not a lightweight theme as it requires

How to Install and Setup the Avada Theme on Your Website

Introduction For more than five years Avada has been the #1 selling theme on all major marketplaces with over 425K+ satisfied customers within 4 years, making it the most used all-in-one WordPress theme on the market today. In this article, we will be showing you the range of powerful customization options, unlimited design potential and flexible framework development that make Avada so loveable. We will begin by exploring the Avada theme’s various customization options and move on to installing and setting up our Avada theme website. So let’s get started. Avada Avada is a brilliant WordPress theme developed by two freelancers, Luke Beck and Mohammed Haris in 2012 to help users create beautiful multipurpose websites even with zero coding skills. It has been proven to

How to Install and Setup Your First Enfold Theme Website

Introduction If you are wondering what the “best theme ever” is… it’s the Enfold Theme. A top rated seller on Themeforest with over 158K sales and an average rating of 4.85 stars, Enfold is the preferred theme for both web designers and their clients. The Enfold theme produces professional looking websites with a plethora of customization options that will satisfy any need from simple and clean websites to highly functional websites. In this article, we will be exploring the functionality of the Enfold theme and it’s various customization options after which we will install and set up our Enfold theme website. So let’s get started. 100,000 products with Enfold? A common question is how Enfold coping with a big site, let say a WooCommerce shop

Installing and Setting Up Your First Divi Website

Introduction If you are reading this it means you are interested in installing, setting up and customizing one of our all-time favorite WordPress theme: Divi. We will start by understanding the Divi theme’s functionalities and using its unique drag and drop tool to build our very own Divi website, explaining each step in detail as we go. So, as promised, we are going to start from the very beginning. The Divi Theme Divi theme is a drag and drop builder released in late 2013 by Elegant Themes now at its version 3.2. It was a big hit among novice and expert website builders alike and Divi is used by over 500k customers today to create websites for themselves and their clients. Divi was introduced as