# Search logs should ignore OpenSearch placeholder terms and optionally tag AI-agent searches

**URL:** https://meta.discourse.org/t/search-logs-should-ignore-opensearch-placeholder-terms-and-optionally-tag-ai-agent-searches/395393
**Category:** Feature
**Tags:** search, dashboard-reports
**Created:** [6 februari 2026 om 18:56 UTC](https://meta.discourse.org/t/search-logs-should-ignore-opensearch-placeholder-terms-and-optionally-tag-ai-agent-searches/395393 "2026-02-06T18:56:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![TheBaby5](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/thebaby5/32/178897_2.png) [@TheBaby5](https://meta.discourse.org/u/TheBaby5)
#### Post date: [6 februari 2026 om 18:56 UTC](https://meta.discourse.org/t/search-logs-should-ignore-opensearch-placeholder-terms-and-optionally-tag-ai-agent-searches/395393/1 "2026-02-06T18:56:57Z")

</div>

## Summary

The **Trending Search Terms** report is polluted by OpenSearch URL template placeholders (e.g. `{searchTerms}`) that are not real searches. This makes the dashboard misleading (often showing `{searchTerms}` as the top “search term” with 0% CTR).

Additionally, as AI-mediated browsing grows, it would be useful to optionally **tag AI-agent initiated searches** separately in search analytics.

* * *

## Problem 1: OpenSearch placeholder noise in SearchLog

On my site, `{searchTerms}` appears as the **#1 trending search term** , with thousands of entries and 0% CTR. These entries come from crawlers/bots (e.g. Googlebot, Bingbot, etc.) crawling `/opensearch.xml` and calling the search endpoint with the literal placeholder string instead of a real query.

This has been discussed before:

- [https://meta.discourse.org/t/what-is-the-search-term-string-in-search-results/175908](https://meta.discourse.org/t/what-is-the-search-term-string-in-search-results/175908)

But the placeholder terms still show up in analytics.

* * *

## Steps to Reproduce

1. Enable/serve OpenSearch (e.g. `/opensearch.xml`) for the site
2. Allow crawlers to access it (default public behavior)
3. Wait for crawlers to fetch the OpenSearch template and hit the search endpoint
4. View **Admin → Reports → Trending Search Terms**
5. Observe placeholder values like `{searchTerms}` dominating the report

* * *

## Expected Behavior

Placeholder/template strings used by OpenSearch clients should **not** be recorded as real searches and should **not** appear in Trending Search Terms.

* * *

## Actual Behavior

Placeholder strings (e.g. `{searchTerms}`) are saved into `SearchLog` and show up as real search terms, polluting analytics.

* * *

## Proposed Fix

Filter known OpenSearch placeholder strings before logging to `SearchLog`, for example:

- `{searchTerms}`
- `{search_term_string}`

(If there are other common variants, adding them would be fine too.)

This is effectively “bot noise,” never a legitimate human query, and it breaks the usefulness of the report.

* * *

## Bigger Opportunity: AI-era search analytics (Optional / Medium–Long Term)

The `{searchTerms}` issue highlights a broader gap: a growing portion of searches are performed by **AI agents on behalf of users** (e.g. when a user asks an assistant “search this forum for X”). Those searches can represent real user intent, but currently they’re mixed with all other traffic and hard to understand.

### Medium Term (Optional)

Tag searches likely initiated by AI agents using `User-Agent` heuristics (examples only):

- ChatGPT browsing / agent UA variants
- Perplexity bots
- Claude-related agents
- Google AI-related UAs (e.g. `GoogleOther`, etc.)

This wouldn’t need to be perfect—just good enough to give admins visibility.

### Long Term (Optional)

Add an “AI Search” filter/tab in the **Trending Search Terms** report so admins can see:

- Human searches
- AI-agent searches
- Everything combined

* * *

## Why This Matters

- Placeholder pollution makes the dashboard less trustworthy and can dominate “Trending”
- Admins shouldn’t have to manually clean analytics or ignore broken top entries
- AI-mediated search traffic is increasing, and site owners benefit from visibility into those intents
