Elevate & Transform Your website with Semantic Search Revolution Using Typesense

As a front-end developer, I’m passionate about merging technology and user experience. In this article, I delve into the fascinating realm of semantic search. Discover more about this powerful technology and how it profoundly affects businesses. In addition, I will share my personal experience of incorporating semantic search functionalities into WordPress using Typesense.

Understanding Semantic Search: How It Works

Semantic search is similar to having an intelligent search. It uses artificial intelligence to understand what you’re really looking for when you type something in a search box. It’s more than just finding words that match; it tries to give you the best and most accurate results. By understanding the meaning behind your words, semantic search can give you results that make more sense. This makes searching online a lot smarter and helpful.

Below are 5 examples of how semantic search works:

  1. Query Understanding:
    • Your Query: “Where can I find Italian restaurants nearby?”
    • How it works: Semantic search understands that you are looking for Italian restaurants that are located in their vicinity.
  2. Synonym Recognition:
    • Your Query: “Cure for a headache”
    • How it works: Semantic search will recognise that “cure” and “remedy” are synonymous; hence the result provided will be relevant for alleviating headaches.
  3. Contextual Intent:
    • Your Query: “Release date of iPhone X”
    • How it works: Semantic search identifies your intention to find the launch date of the IPhone X and it will deliver accurate results about the iPhone X release date.
  4. Numerical Equivalence:
    • Your Query: “Convert 5 miles to kilometers”
    • How it works: Semantic search recognises the conversion aspect and calculates the equivalent value between miles and kilometers and will provide you with the result accordingly.
  5. Categorization:
    • Your Query: “Best budget laptops”
    • How it works: Understanding your desire for cost-effective laptops, semantic search will displays options that match the category of “budget laptops.”

Bridging the gap between Stakeholders and Industries

The potential of semantic search extends far beyond individual queries; it’s a pivotal tool for businesses aiming to enhance their online presence and customer engagement. Businesses have the potential to bring about transformative change by bridging the gap between different stakeholders and industries. They can create partnerships and collaborations that foster innovation and address societal challenges. By leveraging their resources and expertise, businesses can drive positive social and environmental impact while also achieving their financial goals. Embracing this transformative potential can lead to more sustainable and inclusive business practices.

Exploring Typesense with WordPress

semantic search with typesense

The beginning: Installing Typesense

Let’s dive into the beginning of our journey: The reason why we chose Typesense after evaluating other similar applications is due to its UI, being easy to use, fast and open source. To make it even more attractive, it has a WordPress plugin that can be found through the official WordPress plugin repository, Search with Typesense. When we were conducting the evaluation, the test was first carried out by installing Typesense open source into a virtual machine or VPS. The documentation can be found here. It is rather straightforward to implement.

Installation of WordPress With Typesense plugin

Drawing from my extensive familiarity with WordPress over the years, installing WordPress has become a straightforward process for me. This is particularly true when using a specialized form of hosting known as “WordPress Managed hosting,” like Kinsta. The experience has been a source of genuine delight. However, even for those who are new to this, the majority of hosting providers offer a simple tool called a “WordPress installer.” This tool makes the process quite manageable, even if you’re not very experienced. If security is a top concern for you, I recommend opting for “WordPress Managed Hosting” for the best protection.

End of Exploration

Exploring Typesense with WordPress was smooth and easy with its default features and functionality. Everything is in place and it works perfectly fine. However, there were several challenges that I encountered during the implementation of semantic search, which you will discover as you continue reading.

Challenges of Actual Semantic Search Implementation

implementing semantic search

Configuring the Typesense plugin for your Semantic Search

Although the explorative phase was easy, the semantic search implementation led challenges that almost stop us from going any further. That is, the plugin does not support vector encoding and hence the semantic search implementation became difficult to come by.

Vector encoding for Semantic Search

The term vector embedding or nearest neighbor search was rather new to me as this is not something that I normally do in my day to day activities. As a web developer, I know that semantic search is associated with better user experience when it is implemented on websites or applications, however not to the level of converting strings to vectors. Since this was something new for me, a team of AI Engineers were formed to explore how to implement semantic search to implement to Typesense.

Exploring Solutions

While the AI engineers were handling the vector embedding part of the project, I have to find out how to integrate into WordPress since the official plugin could not support the vector integration yet. To do that, we had to look into their use cases documentation and evaluate alternative methods to integrate vector search.

Possible Workarounds Considered:
  • Creating a PHP application
  • Creating a standalone html/js script using Instantsearch.js
  • Creating a custom plugin leveraging on InstantSearch.js and Typesense

The Solution and Implementation

semantic search

Creating a custom plugin with Typesense and Vector Encoder

The project went on with me building the WordPress Plugin while the AI Engineers were working to find and develop the best top-notched vector encoder model for the project. Everything that they have implemented and conclude, are backed with well-researched and detailed explanations based on statistics and vigorous testings.

By the time the vector embedding model was ready, my plugin was also ready to be integrated to work with the vector encoding model and Typesense to Semantic Search implementation. The integration of semantic search isn’t a mere option; it’s a strategic imperative for businesses vying for prominence in the dynamic online arena. As we embrace the capabilities of semantic search, we’re not just shaping the future of our businesses – we’re shaping the way users experience and interact with the digital world.

Semantic Search – See It in Action

We have implemented semantic search using our solution on several websites. If you would like to see the solution in action, visit our ConnectAI AI4SME page today.

Key takeaways of this article:

  • Semantic search is akin to intelligent search, using AI to comprehend search queries.
  • It goes beyond word matching, aiming to provide accurate results by understanding query meaning.
  • Semantic search is enhancing online search capabilities.
  • Businesses can bridge gaps between stakeholders and industries using semantic search.
  • Businesses can achieve financial goals while promoting positive social and environmental impact.
  • Embracing semantic search’s potential can lead to sustainable and inclusive business practices.
  • You can add Semantic Search capabilities to WordPress using Typesense.
  • Visit ConnectAI AI4SME to see the implementation in action.


  • Halim

    I am a web developer, proficient in PHP, HTML, CSS, JS, and WordPress web development. Outside of my professional work as a web engineer at AI Singapore, I am passionate about creating WordPress websites and building plugins for the purpose of self-learning and enjoyment. You can explore some of my plugins in the WordPress plugin repository.