ForEach icon
Search icon
If icon
DiscordIncomingWebhook icon

Find Documentation Gaps with a Meilisearch Zero-Result Queries Review

Find content gaps with Kestra and Meilisearch. Replay top user queries against the docs index and post a Discord alert for each query with zero hits.

Categories
BusinessData

The most valuable content roadmap is the list of things users search for and never find. This blueprint replays your top search queries against the live docs index with io.kestra.plugin.core.flow.ForEach and io.kestra.plugin.meilisearch.Search, and posts one short Discord message per query that returns zero hits. The result is an actionable gap list in the content channel, built from real user intent instead of guesswork.

How it works

  1. review_queries (io.kestra.plugin.core.flow.ForEach) iterates over a plain list of query strings, typically the top queries exported from your search analytics.
  2. Inside the loop, search_query (io.kestra.plugin.meilisearch.Search) runs the current {{ taskrun.value }} against the docs_site index, exactly as the search box would.
  3. check_zero (io.kestra.plugin.core.flow.If) reads the per-iteration hit count as {{ outputs.search_query[taskrun.value].totalHits }} and matches on zero.
  4. Only misses produce output: report_miss posts one Discord message naming the exact query, so the channel accumulates a clean, per-gap list with no noise from queries that work.
  5. The errors block posts a distinct alert when the review itself fails, so a broken run is never mistaken for a gap-free corpus.

What you get

  • A content gap list driven by what users actually type, one message per miss.
  • Per-iteration output addressing with outputs.task_id[taskrun.value], the standard Kestra pattern for loops.
  • Silence as the success signal: a healthy corpus produces no messages at all.
  • A query list that doubles as a regression suite for search relevance after reindexing.

Who it's for

  • Documentation teams prioritizing what to write next from real search demand.
  • Developer experience teams tracking whether the docs answer what users ask.
  • Search operators validating that a reindex or synonym change did not orphan popular queries.

Why orchestrate this with Kestra

Replaying queries is trivial once; doing it after every reindex, keeping the results attributable to an execution, and alerting per miss without spam is orchestration work. Kestra's ForEach fans out the queries, If keeps the noise down to actual gaps, and the execution history records every review, so you can show exactly when a gap appeared and when it was closed.

Prerequisites

  • A populated Meilisearch docs index, for example from the docs site ingest blueprint.
  • A list of top user queries, exported from your search analytics or product analytics tool.
  • A Discord incoming webhook for the gap reports and failure alerts.

Secrets

  • MEILISEARCH_URL: Meilisearch connection URL, e.g. https://meilisearch.internal:7700.
  • MEILISEARCH_KEY: Meilisearch API key with search permissions.
  • DISCORD_WEBHOOK_URL: Discord incoming webhook URL.

Quick start

  1. Add the three secrets to your Kestra namespace.
  2. Replace the demo query list in review_queries with your real top queries.
  3. Execute the flow and check Discord for one message per zero-hit query.
  4. Rerun the review after each content release or reindex, or add a Schedule trigger to make it weekly.

How to extend

  • Load the query list dynamically from your analytics warehouse with a query task and feed it into values.
  • Add a threshold branch that also flags queries with fewer than three hits as weak content.
  • Aggregate the misses into a single weekly digest instead of per-miss messages by collecting results in a Python task.
  • Open a ticket per gap automatically by swapping the Discord task for your issue tracker's plugin.

Links

See How

New to Kestra?

Use blueprints to kickstart your first workflows.