---
title: "What Claude Found When It Ran My Top 100 Searches"
author: "Alejandro AR"
date: 2026-11-19
canonical_url: https://bonsai.io/blog/what-claude-found-when-it-ran-my-top-100-searches/
license: CC BY-SA 4.0
license_url: https://creativecommons.org/licenses/by-sa/4.0/
copyright: Bonsai.io, 2026
---

[Query Logs](https://bonsai.io/docs/features/query-logs/) tell you what people type into your search box and how many results they got. They can't tell you if the results were any good. For that, somebody has to run the top searches one by one and read what comes back, and nobody has an afternoon for it. So I asked Claude to do it.

## What you need

Bonsai has a [hosted MCP server](https://bonsai.io/docs/agents/hosted-mcp/). It's one URL, `https://mcp.bonsai.io/mcp`, that you add to Claude, ChatGPT, Cursor or Claude Code. You sign in, pick what the agent is allowed to do, and it gets tools to work with your clusters.

Two of those tools are enough here. One reads the Query Logs. The other sends a request to a cluster and returns the answer.

## Install and approve

Nothing gets installed on your machine. You add the URL to the app, and you approve it on a Bonsai page.

In Claude, on the web or the desktop app, open **Settings**, then **Connectors**, add a custom connector with the URL `https://mcp.bonsai.io/mcp`, and click **Connect**.

In Claude Code it's one command:

```bash
claude mcp add --transport http bonsai https://mcp.bonsai.io/mcp
```

Then run `/mcp` and pick **bonsai**. ChatGPT and Cursor are in the [docs](https://bonsai.io/docs/agents/hosted-mcp/#connect-an-app).

Either way, a Bonsai page opens in your browser. Log in, then:

1.  Pick the account.
    
2.  Pick the scopes. With these four, the agent can't change anything:
    
    -   `account:read`, checked already.
    -   `clusters:read`, checked already.
    -   `query_logs:read`. Check it, so the agent can read your search terms.
    -   `data:read`. Check it, so the agent can run searches.
3.  Pick how long the approval lasts: 30, 90 or 365 days.
    
4.  Click **Approve**.
    

Approving creates an API token. It shows up in your account's API Tokens tab under the app's name, and Bonsai emails you that the app connected. To take the access back, delete the token.

Later in this post, Claude creates an index, and that needs `data:write`. To add a scope to an approval, you disconnect, connect again and check it.

## The search

The cluster runs search for a furniture store. It's a demo: 17,000 products from [WANDS](https://github.com/wayfair/WANDS), a catalog Wayfair published along with searches their shoppers typed. I replayed those searches against it.

The store searches with the query every tutorial starts with:

```json
POST /products/_search
{
  "size": 10,
  "query": {
    "multi_match": {
      "query": "what the shopper typed",
      "fields": ["product_name", "product_description"]
    }
  }
}
```

## The prompt

I run search for a furniture shop on the Bonsai cluster `furniture-search`. The products are in the `products` index, and the app sends this for every search, with what the shopper typed in place of QUERY: _(the query above)_

  

Look at the top search terms from the last week, run them yourself the way the app does, and tell me what's wrong with my search: which terms come back with poor results, why, and what you'd change first. Don't change anything on the cluster yet.

I also told it to only read, and to check a cause on the cluster before blaming it.

## What came back

Twenty-four minutes later, Claude had run more than 130 searches, all of them reads, and it had two things for me.

The first was a verdict for each of the 100 most searched terms: 44 good, 38 mixed and 18 poor, each with a reason. Three of the poor ones, in its words:

| Search | Claude's reason |
| --- | --- |
| kitchen islands with seating | 0 kitchen islands; 6 bar stools whose copy says "kitchen islands" ("islands" misses "island") |
| outdoor light fixtures | 9 light bulbs whose copy says "fixtures"; 1 outdoor light |
| pool floats | 1 pool float in the top 10; "floats" matches the verb in descriptions (console table, bed, cake knife) and misses "float" |

The second was what to do about it. It grouped the failing searches into six problems. Each one came with the requests it had run as evidence, and with a fix. Three of the six:

| Problem | Searches it hurts | What Claude recommended |
| --- | --- | --- |
| Any single word is enough for a product to match | 30 | A different query. Do this first. |
| Plural and singular never meet: "floats" is not "float" | 11 | A new index that folds plurals |
| The shopper's word is not the catalog's word: "carpet" and "rug" | 5 | A short list of synonyms |

I took them in that order.

## The fix

The first recommendation came with the query, ready to paste. The index stays as it is:

```json
{
  "size": 10,
  "query": {
    "bool": {
      "must": [
        {
          "multi_match": {
            "query": "QUERY",
            "type": "cross_fields",
            "fields": [
              "product_name^3", "product_class^2",
              "category", "product_description"
            ]
          }
        }
      ],
      "should": [
        {
          "constant_score": {
            "filter": {
              "multi_match": {
                "query": "QUERY",
                "type": "cross_fields",
                "minimum_should_match": "2<75%",
                "fields": [
                  "product_name", "product_class",
                  "category", "product_description"
                ]
              }
            },
            "boost": 100
          }
        }
      ]
    }
  }
}
```

The new query searches the product type and the category too, and it counts a word in the name for more than a word in the description. Then it puts the products that have most of the words above the rest.

This is "kitchen islands with seating", before and after:

| The store's query | Claude's query |
| --- | --- |
| casarina counter & bar stool | alisa kitchen island |
| angelia solid wood bar stool | hofmeister kitchen island set |
| severine 30 '' bar stool | ewart kitchen island |
| faustina swivel adjustable height bar stool | elian kitchen cart |
| barnabas colby swivel adjustable height bar stool | almira kitchen island |

"outdoor light fixtures" went from nine light bulbs to ten outdoor wall lights. Nothing in the index changed. The app sends a different query.

## One step further

The new query didn't help "pool floats". The other two recommendations need a new index, and I had told Claude not to change anything. So I told it to go ahead and build one next to the first, with plurals and synonyms.

Before creating anything, it ran a list of words through four ways of folding plurals. It threw out the one that turns "comforters" into "comfort" and "bedding" into "bed", and kept one that only touches plurals.

This is the part of its request that does it, with the two lists cut short:

```json
PUT /products_v2
{
  "settings": {
    "analysis": {
      "filter": {
        "en_plural": {
          "type": "stemmer",
          "language": "plural_english"
        },
        "plural_exceptions": {
          "type": "stemmer_override",
          "rules": ["shelves => shelf", "knives => knife", "..."]
        },
        "shop_synonyms": {
          "type": "synonym_graph",
          "synonyms": ["carpet => carpet, rug", "couch => couch, sofa", "..."]
        }
      }
    }
  }
}
```

To the new index, "pool floats" and "pool float" are the same two words: pool and float.

It created the index, I loaded the products into it, and this is "pool floats" now:

| Before | After |
| --- | --- |
| pool float rattan deck box | sling float pool noodle |
| lopez console table | lazy lounger pool float |
| rose point cake knife | kona hammock pool float |
| kaylee platform bed | zzoodle dragon pool float |
| hammock inflatable pool float pool hammock pool chair water hammock | brierfield pool float canvas art |

The fifth one is a picture of a pool float. I'll allow it.

## Before and after

I had Claude run the same 100 searches again with each change, and judge them the way it did the first time:

|  | Good | Mixed | Poor |
| --- | --- | --- | --- |
| The store's query | 44 | 38 | 18 |
| Claude's query | 46 | 42 | 12 |
| Claude's query on the new index | 55 | 38 | 7 |

And these are the three searches from the start, counted over the first ten results:

| Search | The store's query | After both changes |
| --- | --- | --- |
| kitchen islands with seating | 6 bar stools, no kitchen island | 10 kitchen islands |
| outdoor light fixtures | 9 light bulbs, 1 outdoor light | 10 outdoor lights |
| pool floats | 1 pool float | 6 pool floats |

That's two changes: a different query in the app, and an index that folds plurals and knows a few synonyms.

## Try it on your search

1.  Add `https://mcp.bonsai.io/mcp` to Claude, ChatGPT, Cursor or Claude Code, and approve it with `query_logs:read` and `data:read` checked, as in [Install and approve](https://bonsai.io/blog/what-claude-found-when-it-ran-my-top-100-searches/#install-and-approve).
2.  Paste the prompt with your cluster, your index and the query your app sends. Query Logs knows what people typed and nothing about what your app does with it.
3.  Read a few of the results yourself before you ship the fix.

Have you tried this on your search? I'd like to know what it found.

_Copyright ©️ Bonsai.io, 2026 · By Alejandro AR · Originally published at https://bonsai.io/blog/what-claude-found-when-it-ran-my-top-100-searches/ · CC BY-SA 4.0_
