-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Search] [Playground] Bug get text field for semantic field #197345
[Search] [Playground] Bug get text field for semantic field #197345
Conversation
yansavitski
commented
Oct 22, 2024
•
edited by kibanamachine
Loading
edited by kibanamachine
- Fix [Object object] in retrieval documents when semantic text is used

@@ -21,5 +21,7 @@ export const getValueForSelectedField = (hit: SearchHit, path: string): string = | |||
.join('\n --- \n'); | |||
} | |||
|
|||
return get(hit._source, path, ''); | |||
return has(hit._source, `${path}.text`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have FTR tests that demonstrate this issue is fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ve added a unit test. Adding an FTR test would require significant changes in ftr, like creating an index with a semantic field and relevant data. Considering the simplicity of the case, maybe unit test would be enough?
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]
History
|
Starting backport for target branches: 8.16, 8.x https://github.com/elastic/kibana/actions/runs/11517708282 |
Starting backport for target branches: 8.16, 8.x https://github.com/elastic/kibana/actions/runs/11517708273 |
…197345) - Fix [Object object] in retrieval documents when semantic text is used <img width="825" alt="image" src="https://github.com/user-attachments/assets/39b154ac-727b-40c2-8262-4ff6f892a634"> (cherry picked from commit a224f9e)
💔 Some backports could not be created
Note: Successful backport PRs will be merged automatically after passing CI. Manual backportTo create the backport manually run:
Questions ?Please refer to the Backport tool documentation |
…197345) - Fix [Object object] in retrieval documents when semantic text is used <img width="825" alt="image" src="https://github.com/user-attachments/assets/39b154ac-727b-40c2-8262-4ff6f892a634"> (cherry picked from commit a224f9e)
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
…197345) (#197813) # Backport This will backport the following commits from `main` to `8.16`: - [[Search] [Playground] Bug get text field for semantic field (#197345)](#197345) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Yan Savitski","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-25T11:54:16Z","message":"[Search] [Playground] Bug get text field for semantic field (#197345)\n\n- Fix [Object object] in retrieval documents when semantic text is used\r\n<img width=\"825\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/39b154ac-727b-40c2-8262-4ff6f892a634\">","sha":"a224f9e14bcfc94db669c7e73dc97fc923326e36","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:prev-minor","v8.16.0"],"title":"[Search] [Playground] Bug get text field for semantic field","number":197345,"url":"https://github.com/elastic/kibana/pull/197345","mergeCommit":{"message":"[Search] [Playground] Bug get text field for semantic field (#197345)\n\n- Fix [Object object] in retrieval documents when semantic text is used\r\n<img width=\"825\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/39b154ac-727b-40c2-8262-4ff6f892a634\">","sha":"a224f9e14bcfc94db669c7e73dc97fc923326e36"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197345","number":197345,"mergeCommit":{"message":"[Search] [Playground] Bug get text field for semantic field (#197345)\n\n- Fix [Object object] in retrieval documents when semantic text is used\r\n<img width=\"825\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/39b154ac-727b-40c2-8262-4ff6f892a634\">","sha":"a224f9e14bcfc94db669c7e73dc97fc923326e36"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Yan Savitski <[email protected]>
…97345) (#197814) # Backport This will backport the following commits from `main` to `8.x`: - [[Search] [Playground] Bug get text field for semantic field (#197345)](#197345) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Yan Savitski","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-10-25T11:54:16Z","message":"[Search] [Playground] Bug get text field for semantic field (#197345)\n\n- Fix [Object object] in retrieval documents when semantic text is used\r\n<img width=\"825\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/39b154ac-727b-40c2-8262-4ff6f892a634\">","sha":"a224f9e14bcfc94db669c7e73dc97fc923326e36","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","Team:Search","backport:prev-minor","v8.16.0"],"title":"[Search] [Playground] Bug get text field for semantic field","number":197345,"url":"https://github.com/elastic/kibana/pull/197345","mergeCommit":{"message":"[Search] [Playground] Bug get text field for semantic field (#197345)\n\n- Fix [Object object] in retrieval documents when semantic text is used\r\n<img width=\"825\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/39b154ac-727b-40c2-8262-4ff6f892a634\">","sha":"a224f9e14bcfc94db669c7e73dc97fc923326e36"}},"sourceBranch":"main","suggestedTargetBranches":["8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/197345","number":197345,"mergeCommit":{"message":"[Search] [Playground] Bug get text field for semantic field (#197345)\n\n- Fix [Object object] in retrieval documents when semantic text is used\r\n<img width=\"825\" alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/39b154ac-727b-40c2-8262-4ff6f892a634\">","sha":"a224f9e14bcfc94db669c7e73dc97fc923326e36"}},{"branch":"8.16","label":"v8.16.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Yan Savitski <[email protected]>