Blog - Semantic Search

Blog - Semantic Search

Blog - Semantic Search

Stop Playing "Guess the Keyword"

How Semantic Search in BigQuery and Looker Accelerates E-Commerce Merchandising

Has this ever happened to you:

The calendar struck November and the marketing team wants to launch a "Holiday Spirit" campaign. They ask you for a list of all “Christmasy” products in the catalog to measure past performance and identify candidates for the campaign.

It sounds like a simple request, but you know what comes next. You open your SQL editor and start typing:

WHERE product_name LIKE '%christmas%' OR description LIKE '%xmas%' OR tags LIKE '%holiday%'

Three days later, you are still refining that query. Sam from marketing wants to know why you missed a random "Red Reindeer Sweater" (spoiler: because it didn't have the word "Christmas" in the description). You accidentally included “I’ll be seeing you” by Billie Holiday on vinyl, which definitely doesn't belong (but you have great taste in music). You go back and forth with stakeholders, manually vetting thousands of rows. By the time the list is clean, the campaign launch window is closing, everyone is cranky, and you’re worried this will show up in your peer reviews next month.

This is the "Wildcard Trap." It kills time-to-value, and in a fast-moving e-commerce environment, it leaves money on the table.

There is a better way. By combining BigQuery Vector Search with Looker’s Semantic Layer, we can move from searching for keywords to searching for meaning.

The Shift: From "Wildcards" to "Semantics"

Traditional search relies on exact text matches. We can do better with wildcard matching, but we’re always going to miss something. Worse, we have no good way of measuring how many items we’re excluding. A query for “Christmas Sweater” will only return items that have the words “christmas” and “sweater” in their name or description. This means we’d miss “Rudolph Sweater”, “Holiday Sweater”, “Ugly Sweater”, “Festive Sweater”, or any obviously “Christmasy” sweater that doesn’t have the word “Christmas” in it.

Semantic Search is different. It uses vector embeddings—numerical representations of your catatlog—to understand the context and intent behind a query.

When you implement this pattern using BigQuery Machine Learning (BQML), Google Gemini, and Looker, you aren't just matching strings; you are matching concepts. The idea of a Christmas Sweater, for example.

The "Beach Clothing" Test

Let’s look at a real-world example we use in demos.

If I write a standard SQL query for "Beach Clothing" using wildcards, I get a fragmented list of results. I might start with “bathing suit”, “swim suit”, and “swim trunks”, eventually refining to “%bathing%”, “%swim%”, and “%beach%” for wildcard matches. This list is extremely limited, however, and would require several rounds of adjustment.

A semantic search workflow in Looker is much simpler:

  1. We simply pass "Beach Clothing" into a Looker filter.

  2. Looker passes this string to BigQuery, which converts that text into a vector and compares it against our entire catalog

  3. Looker returns the sales metrics for the items that most closely match the concept of “Beach Clothing”

The result? The system instantly surfaces swim trunks, bikinis, straw hats, and cover up dresses—even if the words “beach” or "clothing" are nowhere in the product description. It simply understands that a "cover up" is a type of beach clothing.

Why This Matters for Your Team?

For Analytics Managers and Marketing stakeholders, this shift is transformative:

  • Drastic Reduction in Time-to-Value: What used to take a week of back-and-forth query refinement now takes seconds. A marketing manager can self-serve a list of "Cozy Winter Vibes" products without waiting on an analyst ticket.

  • Higher Accuracy & Revenue: You capture the long-tail items that manual filters miss. That means more products in front of customers and better data for inventory planning.

  • Analyst Satisfaction: Your data team stops writing 50-line WHERE clauses and starts building high-value data products.

Why Looker? The Semantic Layer Advantage

You might be wondering if you can replicate this pattern without Looker.

Sure, there are dozens of options for vector search workflows. But Looker is uniquely positioned to operationalize this because of its Semantic Layer.

In other tools, semantic search is often a disjointed science experiment—something that lives in a notebook or a separate app. Looker allows us to integrate the BQML call directly into our data model (LookML). This means the complex "math" of vector search is abstracted away.

To the end user (the Marketing Manager), it just looks like a standard filter. They don't need to know that a sophisticated machine learning process is running in the background; they just know they got the right data, instantly.

Competitors in the BI space struggle to bridge this gap between raw data warehouse functions and the business user interface. Looker’s tight integration with BigQuery makes it seamless. It is a complete data platform, not just a visualization tool.

Conclusion

E-commerce is too competitive to rely on manual keyword guessing. By leveraging Semantic Search with BigQuery and Looker, you aren't just querying your catalog—you're understanding it.