Query Insights provides top N but not Live Queries

Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 3.5

Describe the issue: I am able to see Top N related query data just like Top N queries - OpenSearch Documentation suggests. However, the Live Queries never show up, and when I do GET /_insights/live_queries I don’t get any results. I can share a link to my OpenSearch setup if that helps someone debug the issue. Seems like if top n worked, then so would live queries?

When I run a query to tickle it, the only thing that changes is “Completions” which does increment a bit.

Relevant Logs or Screenshots:

@dep4b I think this is expected when your query execution is short.
As per your screenshot, you see total completions, which means the plugin can see your completed queries, and there are none currently running.

cool…. is there a way to take a query and add a sleep or other silly thing just to make it take a long time and have it show up? Curious to see what this looks like, and in dev my queries are all fast!

@dep4b Try this. Don’t perform that on the production cluster.
Test with lower numbers first at for (int i = 0; i < 900000; i++)

GET security-auditlog-2026.02.19/_search?request_cache=false
{
  "size": 10000,
  "track_total_hits": true,
  "query": {
    "script_score": {
      "query": { "match_all": {} },
      "script": {
        "lang": "painless",
        "source": """
          double x = 1.0;
          long s = doc['_seq_no'].value;
          for (int i = 0; i < 900000; i++) {
            x = x + Math.abs(Math.sin(x + s) + Math.cos(x + i));
          }
          return x;
        """
      }
    }
  }
}

You should see something like this.

1 Like