[Search][Fix] pass retriever query via body param instead of query in JS tutorial#237654
Merged
seialkali merged 1 commit intoelastic:mainfrom Oct 7, 2025
Merged
Conversation
44ea56a to
52e3a58
Compare
52e3a58 to
98a8055
Compare
Contributor
💚 Build Succeeded
Metrics [docs]Async chunks
History
|
efegurkan
approved these changes
Oct 7, 2025
Contributor
|
Starting backport for target branches: 9.1, 9.2 |
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 7, 2025
… JS tutorial (elastic#237654) ## Summary This PR fixes an issue where the retriever query copied from the "Search your data" JavaScript tutorial fails with a `parsing_exception` when passed via the query parameter in the Node.js Elasticsearch client. Retriever queries must be passed via the body parameter to ensure they are serialized correctly. ### Screenshots **BEFORE** <img width="700" alt="Screenshot 2025-10-06 at 14 33 13" src="https://github.com/user-attachments/assets/46c33d73-2339-4047-917c-949e96b8a9b9" /> **AFTER** <img width="700" alt="Screenshot 2025-10-06 at 14 35 20" src="https://github.com/user-attachments/assets/c9e697f6-788c-43d9-b0a6-57746ade44f7" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~ - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release Note Fixes an issue where the retriever query copied from the "Search your data" JavaScript tutorial fails with a `parsing_exception` when passed via the query parameter in the Node.js Elasticsearch client. Retriever queries must be passed via the body parameter to ensure they are serialized correctly. (cherry picked from commit c51ac9c)
kibanamachine
pushed a commit
to kibanamachine/kibana
that referenced
this pull request
Oct 7, 2025
… JS tutorial (elastic#237654) ## Summary This PR fixes an issue where the retriever query copied from the "Search your data" JavaScript tutorial fails with a `parsing_exception` when passed via the query parameter in the Node.js Elasticsearch client. Retriever queries must be passed via the body parameter to ensure they are serialized correctly. ### Screenshots **BEFORE** <img width="700" alt="Screenshot 2025-10-06 at 14 33 13" src="https://github.com/user-attachments/assets/46c33d73-2339-4047-917c-949e96b8a9b9" /> **AFTER** <img width="700" alt="Screenshot 2025-10-06 at 14 35 20" src="https://github.com/user-attachments/assets/c9e697f6-788c-43d9-b0a6-57746ade44f7" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~ - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release Note Fixes an issue where the retriever query copied from the "Search your data" JavaScript tutorial fails with a `parsing_exception` when passed via the query parameter in the Node.js Elasticsearch client. Retriever queries must be passed via the body parameter to ensure they are serialized correctly. (cherry picked from commit c51ac9c)
Contributor
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
kibanamachine
added a commit
that referenced
this pull request
Oct 7, 2025
…ery in JS tutorial (#237654) (#237832) # Backport This will backport the following commits from `main` to `9.2`: - [[Search][Fix] pass retriever query via body param instead of query in JS tutorial (#237654)](#237654) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2025-10-07T12:16:53Z","message":"[Search][Fix] pass retriever query via body param instead of query in JS tutorial (#237654)\n\n## Summary\n\nThis PR fixes an issue where the retriever query copied from the \"Search\nyour data\" JavaScript tutorial fails with a `parsing_exception` when\npassed via the query parameter in the Node.js Elasticsearch client.\nRetriever queries must be passed via the body parameter to ensure they\nare serialized correctly.\n\n### Screenshots\n\n**BEFORE**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 33 13\"\nsrc=\"https://github.com/user-attachments/assets/46c33d73-2339-4047-917c-949e96b8a9b9\"\n/>\n\n**AFTER**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 35 20\"\nsrc=\"https://github.com/user-attachments/assets/c9e697f6-788c-43d9-b0a6-57746ade44f7\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release Note\n\nFixes an issue where the retriever query copied from the \"Search your\ndata\" JavaScript tutorial fails with a `parsing_exception` when passed\nvia the query parameter in the Node.js Elasticsearch client. Retriever\nqueries must be passed via the body parameter to ensure they are\nserialized correctly.","sha":"c51ac9ceb377bf9b2a8b2c08b759ec2d519c432a","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.2.0","v9.3.0","v9.1.6"],"title":"[Search][Fix] pass retriever query via body param instead of query in JS tutorial","number":237654,"url":"https://github.com/elastic/kibana/pull/237654","mergeCommit":{"message":"[Search][Fix] pass retriever query via body param instead of query in JS tutorial (#237654)\n\n## Summary\n\nThis PR fixes an issue where the retriever query copied from the \"Search\nyour data\" JavaScript tutorial fails with a `parsing_exception` when\npassed via the query parameter in the Node.js Elasticsearch client.\nRetriever queries must be passed via the body parameter to ensure they\nare serialized correctly.\n\n### Screenshots\n\n**BEFORE**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 33 13\"\nsrc=\"https://github.com/user-attachments/assets/46c33d73-2339-4047-917c-949e96b8a9b9\"\n/>\n\n**AFTER**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 35 20\"\nsrc=\"https://github.com/user-attachments/assets/c9e697f6-788c-43d9-b0a6-57746ade44f7\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release Note\n\nFixes an issue where the retriever query copied from the \"Search your\ndata\" JavaScript tutorial fails with a `parsing_exception` when passed\nvia the query parameter in the Node.js Elasticsearch client. Retriever\nqueries must be passed via the body parameter to ensure they are\nserialized correctly.","sha":"c51ac9ceb377bf9b2a8b2c08b759ec2d519c432a"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.1"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237654","number":237654,"mergeCommit":{"message":"[Search][Fix] pass retriever query via body param instead of query in JS tutorial (#237654)\n\n## Summary\n\nThis PR fixes an issue where the retriever query copied from the \"Search\nyour data\" JavaScript tutorial fails with a `parsing_exception` when\npassed via the query parameter in the Node.js Elasticsearch client.\nRetriever queries must be passed via the body parameter to ensure they\nare serialized correctly.\n\n### Screenshots\n\n**BEFORE**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 33 13\"\nsrc=\"https://github.com/user-attachments/assets/46c33d73-2339-4047-917c-949e96b8a9b9\"\n/>\n\n**AFTER**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 35 20\"\nsrc=\"https://github.com/user-attachments/assets/c9e697f6-788c-43d9-b0a6-57746ade44f7\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release Note\n\nFixes an issue where the retriever query copied from the \"Search your\ndata\" JavaScript tutorial fails with a `parsing_exception` when passed\nvia the query parameter in the Node.js Elasticsearch client. Retriever\nqueries must be passed via the body parameter to ensure they are\nserialized correctly.","sha":"c51ac9ceb377bf9b2a8b2c08b759ec2d519c432a"}},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Brittany <seialkali@gmail.com>
kibanamachine
added a commit
that referenced
this pull request
Oct 7, 2025
…ery in JS tutorial (#237654) (#237831) # Backport This will backport the following commits from `main` to `9.1`: - [[Search][Fix] pass retriever query via body param instead of query in JS tutorial (#237654)](#237654) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Brittany","email":"seialkali@gmail.com"},"sourceCommit":{"committedDate":"2025-10-07T12:16:53Z","message":"[Search][Fix] pass retriever query via body param instead of query in JS tutorial (#237654)\n\n## Summary\n\nThis PR fixes an issue where the retriever query copied from the \"Search\nyour data\" JavaScript tutorial fails with a `parsing_exception` when\npassed via the query parameter in the Node.js Elasticsearch client.\nRetriever queries must be passed via the body parameter to ensure they\nare serialized correctly.\n\n### Screenshots\n\n**BEFORE**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 33 13\"\nsrc=\"https://github.com/user-attachments/assets/46c33d73-2339-4047-917c-949e96b8a9b9\"\n/>\n\n**AFTER**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 35 20\"\nsrc=\"https://github.com/user-attachments/assets/c9e697f6-788c-43d9-b0a6-57746ade44f7\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release Note\n\nFixes an issue where the retriever query copied from the \"Search your\ndata\" JavaScript tutorial fails with a `parsing_exception` when passed\nvia the query parameter in the Node.js Elasticsearch client. Retriever\nqueries must be passed via the body parameter to ensure they are\nserialized correctly.","sha":"c51ac9ceb377bf9b2a8b2c08b759ec2d519c432a","branchLabelMapping":{"^v9.3.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","Team:Search","backport:version","v9.2.0","v9.3.0","v9.1.6"],"title":"[Search][Fix] pass retriever query via body param instead of query in JS tutorial","number":237654,"url":"https://github.com/elastic/kibana/pull/237654","mergeCommit":{"message":"[Search][Fix] pass retriever query via body param instead of query in JS tutorial (#237654)\n\n## Summary\n\nThis PR fixes an issue where the retriever query copied from the \"Search\nyour data\" JavaScript tutorial fails with a `parsing_exception` when\npassed via the query parameter in the Node.js Elasticsearch client.\nRetriever queries must be passed via the body parameter to ensure they\nare serialized correctly.\n\n### Screenshots\n\n**BEFORE**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 33 13\"\nsrc=\"https://github.com/user-attachments/assets/46c33d73-2339-4047-917c-949e96b8a9b9\"\n/>\n\n**AFTER**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 35 20\"\nsrc=\"https://github.com/user-attachments/assets/c9e697f6-788c-43d9-b0a6-57746ade44f7\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release Note\n\nFixes an issue where the retriever query copied from the \"Search your\ndata\" JavaScript tutorial fails with a `parsing_exception` when passed\nvia the query parameter in the Node.js Elasticsearch client. Retriever\nqueries must be passed via the body parameter to ensure they are\nserialized correctly.","sha":"c51ac9ceb377bf9b2a8b2c08b759ec2d519c432a"}},"sourceBranch":"main","suggestedTargetBranches":["9.2","9.1"],"targetPullRequestStates":[{"branch":"9.2","label":"v9.2.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.3.0","branchLabelMappingKey":"^v9.3.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/237654","number":237654,"mergeCommit":{"message":"[Search][Fix] pass retriever query via body param instead of query in JS tutorial (#237654)\n\n## Summary\n\nThis PR fixes an issue where the retriever query copied from the \"Search\nyour data\" JavaScript tutorial fails with a `parsing_exception` when\npassed via the query parameter in the Node.js Elasticsearch client.\nRetriever queries must be passed via the body parameter to ensure they\nare serialized correctly.\n\n### Screenshots\n\n**BEFORE**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 33 13\"\nsrc=\"https://github.com/user-attachments/assets/46c33d73-2339-4047-917c-949e96b8a9b9\"\n/>\n\n**AFTER**\n\n<img width=\"700\" alt=\"Screenshot 2025-10-06 at 14 35 20\"\nsrc=\"https://github.com/user-attachments/assets/c9e697f6-788c-43d9-b0a6-57746ade44f7\"\n/>\n\n### Checklist\n\nCheck the PR satisfies following conditions. \n\nReviewers should verify this PR satisfies this list as well.\n\n- [ ] ~Any text added follows [EUI's writing\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\nsentence case text and includes [i18n\nsupport](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~\n- [ ]\n~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\nwas added for features that require explanation or tutorials~\n- [ ] ~[Unit or functional\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\nwere updated or added to match the most common scenarios~\n- [ ] ~If a plugin configuration key changed, check if it needs to be\nallowlisted in the cloud and added to the [docker\nlist](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~\n- [ ] ~This was checked for breaking HTTP API changes, and any breaking\nchanges have been approved by the breaking-change committee. The\n`release_note:breaking` label should be applied in these situations.~\n- [ ] ~[Flaky Test\nRunner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was\nused on any tests changed~\n- [x] The PR description includes the appropriate Release Notes section,\nand the correct `release_note:*` label is applied per the\n[guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)\n- [x] Review the [backport\nguidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing)\nand apply applicable `backport:*` labels.\n\n## Release Note\n\nFixes an issue where the retriever query copied from the \"Search your\ndata\" JavaScript tutorial fails with a `parsing_exception` when passed\nvia the query parameter in the Node.js Elasticsearch client. Retriever\nqueries must be passed via the body parameter to ensure they are\nserialized correctly.","sha":"c51ac9ceb377bf9b2a8b2c08b759ec2d519c432a"}},{"branch":"9.1","label":"v9.1.6","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Brittany <seialkali@gmail.com>
rylnd
pushed a commit
to rylnd/kibana
that referenced
this pull request
Oct 17, 2025
… JS tutorial (elastic#237654) ## Summary This PR fixes an issue where the retriever query copied from the "Search your data" JavaScript tutorial fails with a `parsing_exception` when passed via the query parameter in the Node.js Elasticsearch client. Retriever queries must be passed via the body parameter to ensure they are serialized correctly. ### Screenshots **BEFORE** <img width="700" alt="Screenshot 2025-10-06 at 14 33 13" src="https://github.com/user-attachments/assets/46c33d73-2339-4047-917c-949e96b8a9b9" /> **AFTER** <img width="700" alt="Screenshot 2025-10-06 at 14 35 20" src="https://github.com/user-attachments/assets/c9e697f6-788c-43d9-b0a6-57746ade44f7" /> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [ ] ~Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/src/platform/packages/shared/kbn-i18n/README.md)~ - [ ] ~[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials~ - [ ] ~[Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios~ - [ ] ~If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the [docker list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)~ - [ ] ~This was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. The `release_note:breaking` label should be applied in these situations.~ - [ ] ~[Flaky Test Runner](https://ci-stats.kibana.dev/trigger_flaky_test_runner/1) was used on any tests changed~ - [x] The PR description includes the appropriate Release Notes section, and the correct `release_note:*` label is applied per the [guidelines](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) - [x] Review the [backport guidelines](https://docs.google.com/document/d/1VyN5k91e5OVumlc0Gb9RPa3h1ewuPE705nRtioPiTvY/edit?usp=sharing) and apply applicable `backport:*` labels. ## Release Note Fixes an issue where the retriever query copied from the "Search your data" JavaScript tutorial fails with a `parsing_exception` when passed via the query parameter in the Node.js Elasticsearch client. Retriever queries must be passed via the body parameter to ensure they are serialized correctly.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR fixes an issue where the retriever query copied from the "Search your data" JavaScript tutorial fails with a
parsing_exceptionwhen passed via the query parameter in the Node.js Elasticsearch client. Retriever queries must be passed via the body parameter to ensure they are serialized correctly.Screenshots
BEFORE
AFTER
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsUnit or functional tests were updated or added to match the most common scenariosIf a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker listThis was checked for breaking HTTP API changes, and any breaking changes have been approved by the breaking-change committee. Therelease_note:breakinglabel should be applied in these situations.Flaky Test Runner was used on any tests changedrelease_note:*label is applied per the guidelinesbackport:*labels.Release Note
Fixes an issue where the retriever query copied from the "Search your data" JavaScript tutorial fails with a
parsing_exceptionwhen passed via the query parameter in the Node.js Elasticsearch client. Retriever queries must be passed via the body parameter to ensure they are serialized correctly.