Let's be honest: most of the time, using a website's search function is a source of frustration. It often involves endless scrolling and multiple page changes to find what you're actually looking for. I’m not even talking about searching by post category, date, or "God forbid" the author. This is because a typical search function relies solely on a keyword search against the database.
You can achieve better results using Google Dork operators like "site:" to limit Google Search results to a specific website. This works because Google doesn’t just perform a simple keyword search. So, can I implement a similar search process on a WordPress website?
The design is straightforward, as I explained in Exploring Search Types in Azure AI Search Service Indexes, if the content is indexed, we can use an AI model to retrieve results. The best part? You can implement a hybrid search that combines keywords, vectors (for similarity), and semantic ranking, as the model tries to understand what you actually want to search for.
* in green is the new AI flow
Part 2 will be about Azure index design and bringing the content from the SQL database.
Featured image generated with Grok Imagine.