Case Study
15 min read

Building a Smart Website Search: Beyond Keyword Matching

Why we built our own website search, how it works, and what we've learned since launch.

Applied AIHybrid SearchSearch AnalyticsSoftware ArchitectureRedisNext.js
Listen to this insight0:00 / 0:00
Audio generated by AI

In this insight

  • What we wanted to build and why
  • Keeping website, course, and directory data in sync
  • Combining keyword and semantic search
  • Generating AI Overviews and reviewing AI content
  • Performance, caching, and tools for staff
  • What we're learning from search analytics

Our existing website search did the job. Visitors could search website pages and courses from the LMS, and the site also had locators for finding professionals and schools. Staff could pin pages to the top of results, and we had some analytics to work with.

We had adopted the search platform during an earlier website redesign. Over time, we wanted more from it, and the cost was becoming difficult to justify for the capabilities it offered.

I had pitched Algolia a few times in the past. Those conversations gradually turned into a proposal for a custom application that would give us more control over the experience for our members and better insights for our staff. When we got the go-ahead to figure out the future of website search, we chose to build a standalone application using Next.js, Redis, and Google Cloud.

People search in different ways. Some know exactly what to search for, others use a few keywords, type an acronym, make a spelling mistake, or ask a question in everyday language. Keyword search alone was no longer enough for the experience we wanted to provide.

The goal was straightforward: help people find relevant information faster, with less frustration. We also wanted to understand what they were looking for, where search was falling short, and what we could improve in both the results and the website content.

What we wanted to build

Before getting into the implementation, these were the things we wanted the new search to do.

  • Go beyond exact keywords.Support different wording, common spelling mistakes, acronyms, and questions in everyday language, while keeping exact matches useful.
  • Provide an AI Overview.Give visitors a short paragraph summarizing what the retrieved content says about their search, with the results available for further reading.
  • Offer suggestions while people type.Help visitors recognize a useful page or course before they finish entering their search.
  • Keep the experience fast.Return results quickly and let people use them while the AI Overview is being generated.
  • Collect useful insights.Understand what people search for, how they interact with results, and where they struggle to find something.
  • Protect the application from abuse.Make security and AI usage controls part of the plan so a public search box could not become an easy way to run up a large bill.
  • Bring the searchable data into Redis.Keep website content, LMS courses, and directory records from netFORUM available to the application and synchronized with their source systems.
  • Give staff control.Support pinned results, custom overviews, synonyms, acronyms, externally hosted pages when needed, and search pages scoped to particular content.
  • Use caching deliberately.Reuse expensive work where it makes sense, while accounting for changes to the content and search settings.

There was plenty to learn as we put these pieces together, especially around how the AI should use the content we gave it.

Why we chose a standalone application

The search needed data from several systems, but we wanted one place to manage the search experience. A standalone application gave us room to work on the interface, ranking, AI features, and staff tools together.

We used Next.js for the application and Google Cloud for hosting and AI services. Vertex AI generates the embeddings used for semantic search, and Gemini generates the overviews and optional page descriptions. Redis stores the searchable records and supports full-text search, vector search, location queries, and caching.

Redis has been one of my favorite parts of this project. Having these capabilities available in one place gave us a lot to work with, and its performance has been impressive. It can look like overkill for a website search box, but we have broader plans for what we want to build with Redis. This is one piece of that bigger picture.

Getting the content into Redis

The website CMS, LMS, and netFORUM remain the places where the source content is managed. Our application receives updates through a synchronization API and prepares those records for search.

Website pages, courses, and directory listings need different processing. A page needs its text read and an embedding generated. A course brings structured information such as instructors, learning objectives, format, and CE credits. A directory record needs a usable location so it can participate in geographic searches.

We validate incoming data and keep records out of search until their required processing succeeds. Optional AI descriptions are handled separately. If generating a description fails, that should not prevent an otherwise valid page from being found.

Updates can also finish in a different order from the one in which they arrived. To handle that, we version each record and check the version as part of an atomic Redis update. An older job cannot overwrite a newer change or bring back a record that has since been deleted.

Staff can see failed synchronization jobs and retry them. That visibility matters because a missing result may be a content or synchronization problem rather than a ranking problem. We need to be able to tell the difference.

Getting the AI Overview to behave

Getting the AI Overview to produce the kind of answer we wanted was one of the hardest parts of the build. It took repeated attempts to work through the instructions, the source material, the output format, and the checks around it.

We wanted a short paragraph that helped someone understand what the retrieved content said about their question. It needed to preserve details such as dates and intended audiences, stay within the supplied material, and recognize when the sources did not contain enough information.

For an overview, we give Gemini selected source content retrieved for the search, usually from up to ten top results. We use compact descriptions, excerpts, stored summaries, and structured course information to keep the input manageable.

Preparing summaries during synchronization helps keep the input smaller when a visitor searches. It also gives us a chance to check those summaries separately before using them in an overview.

Instructions and application checks

The prompt tells Gemini how we want it to respond, but we also check the response in application code. Those are separate responsibilities.

The application checks for incomplete or disallowed output before showing an overview. If the request times out or a response fails those checks, we leave the overview out and keep the search results available.

These checks catch specific problems. They don't confirm that every sentence is correct, but they help a lot.

Reviewing descriptions and summaries

AI-written page descriptions and stored summaries also go through checks for format, length, and completeness. We flag details such as numbers or names that may not be supported by the source.

Staff can review flagged text and accept specific exceptions. Approvals are recorded and apply to that saved version, so changed content needs a fresh review. This process covers stored descriptions and summaries; staff are not approving every overview generated for a visitor.

Showing results without waiting for AI

We made an important decision about the interface: search results should appear independently of the AI Overview.

Once the results are ready, visitors can read them, apply filters, or open a page. The overview can finish generating separately. Someone who sees the course they need should be able to click it immediately.

The search timings we have observed so far are:

  • Average search time: 141 ms.
  • Searches completed in under 500 ms: 95%.

These timings cover the search results; the AI Overview generates separately.

Caching the work that makes sense to reuse

We did not want repeated searches to mean repeating every expensive operation. We also needed updates to the content and configuration to be reflected in what people saw.

We cache query embeddings, and we reuse a document embedding when its input text has not changed. Search result lists themselves are not cached.

We cache AI Overviews based on the query, source content, and generation settings. The date is included too, so an overview about upcoming events is not automatically reused the next day.

We also give individual steps time limits. If creating a query embedding takes too long, search can fall back to keyword results. If the overview fails, the results remain usable.

These caching decisions help keep responses quick and avoid making the same paid AI calls repeatedly.

Giving staff useful control

The previous search already allowed staff to pin results, and we wanted to keep that control while making the surrounding tools more useful.

The staff console brings together pinned results, curated answers, synonyms, feature settings, search analytics, and operational tools. Staff can retry failed synchronization jobs, clear caches, inspect how a result was scored, and review flagged AI descriptions and summaries.

We also wanted room for content that does not fit the usual website page or LMS course: links to useful external pages, for example, or a search page scoped to a particular set of content. Those needs were part of the customization plan from the beginning.

Staff can use what they see in the analytics to make practical changes, such as adding a synonym or pinning a useful page. Having those tools in the same application makes it easier to act on what we learn after launch.

What we track and what it tells us

The insights after launch have been especially valuable. Real usage is showing us where small adjustments can make the experience better.

We track several parts of the search experience:

  • What people search for:total searches, unique search terms, top terms over time, and terms people also search for.
  • How a search begins:where it starts and how the visitor initiates it.
  • How people use results:result clicks, click-through rates, the most-clicked pages or courses, and clicks by result position.
  • Where people may be struggling:searches with no results, searches without exact keyword matches, and searches repeated or changed without a result click.
  • Which features people use:filters and the thumbs-up or thumbs-down feedback on AI Overviews.

These signals become more useful when we look at them together. A search without an exact keyword match may still return useful semantic results. A visitor who searches again without clicking may be struggling, but a visitor can also get what they need from an overview. We need the surrounding behavior to interpret the numbers.

The same information can guide content work. If people repeatedly look for a subject and struggle to find it, we can check the page title, terminology, amount of information available, and search configuration. The next improvement may be a clearer page rather than a ranking change.

Encouraging results after launch

Since launch, 74% of result clicks have gone to the top three results, and 85% to the top five. For a new search experience, it is encouraging to see people engaging with results near the top of the list.

We will keep watching these patterns as we refine the search and learn more about how people use it.

Making courses easier to find

Courses were the most-used filter type. After launch, we added a CE Course tag to search results so visitors could narrow their search to continuing-education courses even before using the filter.

We also added a CE: prefix to search suggestions accordingly, making courses easier to recognize while typing.

These were small updates, but they came directly from seeing what people were looking for and how they used the search.

NN

Nagesh Namana

Building practical technology solutions for non-profit and mission-driven organizations.

© 2026 nagesh.dev · All rights reserved