Skip to content
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

Merged
merged 5 commits into from
Oct 25, 2024

Conversation

yansavitski
Copy link
Contributor

@yansavitski yansavitski commented Oct 22, 2024

  • Fix [Object object] in retrieval documents when semantic text is used
image

@yansavitski yansavitski added release_note:skip Skip the PR/issue when compiling release notes Team:Search v8.16.0 labels Oct 22, 2024
@yansavitski yansavitski requested a review from a team as a code owner October 22, 2024 22:00
@yansavitski yansavitski added the backport:skip This commit does not require backporting label Oct 22, 2024
@@ -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`)
Copy link
Member

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?

Copy link
Contributor Author

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?

@elasticmachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

✅ unchanged

History

@yansavitski yansavitski enabled auto-merge (squash) October 25, 2024 11:51
@yansavitski yansavitski merged commit a224f9e into elastic:main Oct 25, 2024
26 checks passed
@joemcelroy joemcelroy added backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) and removed backport:skip This commit does not require backporting v9.0.0 labels Oct 25, 2024
@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11517708282

@kibanamachine
Copy link
Contributor

Starting backport for target branches: 8.16, 8.x

https://github.com/elastic/kibana/actions/runs/11517708273

@joemcelroy joemcelroy deleted the fix-playground-retrieval branch October 25, 2024 11:55
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 25, 2024
…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)
@kibanamachine
Copy link
Contributor

💔 Some backports could not be created

Status Branch Result
8.16 An unhandled error occurred. Please see the logs for details
8.x

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 197345

Questions ?

Please refer to the Backport tool documentation

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Oct 25, 2024
…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)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.16
8.x

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 25, 2024
…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]>
kibanamachine added a commit that referenced this pull request Oct 25, 2024
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (9.0) the previous minor version (i.e. one version back from main) release_note:skip Skip the PR/issue when compiling release notes Team:Search v8.16.0 v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants