kibana/x-pack/plugins/searchprofiler
Kibana Machine 2d13929ba9
[8.16] [Search Profiler] Index field no longer resets on query edit (#215420) (#215496)
# Backport

This will backport the following commits from `main` to `8.16`:
- [[Search Profiler] Index field no longer resets on query edit
(#215420)](https://github.com/elastic/kibana/pull/215420)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Matthew
Kime","email":"matt@mattki.me"},"sourceCommit":{"committedDate":"2025-03-21T13:29:33Z","message":"[Search
Profiler] Index field no longer resets on query edit (#215420)\n\n##
Summary\n\nPreviously, editing the query would reset the index field to
`_all`.\nThis was due to using `useState` instead of `useRef` to store
the query\nvalue.\n\nCloses
https://github.com/elastic/kibana/issues/214416\n\nHow to test\n1. Go to
search profiler\n2. Enter an index name, anything but `_all` - which is
already there\n3. Edit the query\n4. Did the index value remain
unchanged? Good! Its fixed!\n\nALSO - need to test to make sure this
works with content in the
url.","sha":"f77e29f5827c621d29959cbbf8514ce497565263","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Feature:Kibana
Management","Feature:Search
Profiler","backport:prev-major","v9.1.0"],"title":"[Search Profiler]
Index field no longer resets on query
edit","number":215420,"url":"https://github.com/elastic/kibana/pull/215420","mergeCommit":{"message":"[Search
Profiler] Index field no longer resets on query edit (#215420)\n\n##
Summary\n\nPreviously, editing the query would reset the index field to
`_all`.\nThis was due to using `useState` instead of `useRef` to store
the query\nvalue.\n\nCloses
https://github.com/elastic/kibana/issues/214416\n\nHow to test\n1. Go to
search profiler\n2. Enter an index name, anything but `_all` - which is
already there\n3. Edit the query\n4. Did the index value remain
unchanged? Good! Its fixed!\n\nALSO - need to test to make sure this
works with content in the
url.","sha":"f77e29f5827c621d29959cbbf8514ce497565263"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/215420","number":215420,"mergeCommit":{"message":"[Search
Profiler] Index field no longer resets on query edit (#215420)\n\n##
Summary\n\nPreviously, editing the query would reset the index field to
`_all`.\nThis was due to using `useState` instead of `useRef` to store
the query\nvalue.\n\nCloses
https://github.com/elastic/kibana/issues/214416\n\nHow to test\n1. Go to
search profiler\n2. Enter an index name, anything but `_all` - which is
already there\n3. Edit the query\n4. Did the index value remain
unchanged? Good! Its fixed!\n\nALSO - need to test to make sure this
works with content in the
url.","sha":"f77e29f5827c621d29959cbbf8514ce497565263"}}]}] BACKPORT-->

Co-authored-by: Matthew Kime <matt@mattki.me>
2025-03-21 17:48:56 +02:00
..
common
public [8.16] [Search Profiler] Index field no longer resets on query edit (#215420) (#215496) 2025-03-21 17:48:56 +02:00
server async-import plugins in the server side (#170856) 2023-11-15 00:55:56 -07:00
jest.config.js
kibana.jsonc [Mgmt] Remove usage of deprecated modules for mounting React, Part II (#182043) 2024-05-07 08:59:44 -07:00
README.md
tsconfig.json [8.x] [Search profiler] Migrate ace to monaco (#195343) (#195724) 2024-10-10 13:01:25 +02:00

Search Profiler

About

The search profiler consumes the Profile API by sending a search API with profile: true enabled in the request body. The response contains detailed information on how Elasticsearch executed the search request. People use this information to understand why a search request might be slow.

How to test

Query profile

Execute the default query to generate results in the Query profile tab.

{
  "query":{
    "match_all" : {}
  }
}

Aggregation profile

Execute an aggregation query to generate results in the Aggregation profile tab.

{
  "aggs": {
    "avg_grade": { "avg": { "field": "grade" } }
  }
}