[9.0] [Obs AI Assistant] Use update-by-query for semantic_text migration (#220255)#220647
Merged
sorenlouv merged 4 commits intoelastic:9.0from May 14, 2025
Merged
[9.0] [Obs AI Assistant] Use update-by-query for semantic_text migration (#220255)#220647sorenlouv merged 4 commits intoelastic:9.0from
sorenlouv merged 4 commits intoelastic:9.0from
Conversation
…lastic#220255) Closes: elastic#220339 **Background** The `semantic_text` migration will migrate content from `text` field to `semantic_text` field. It does so with a recursive function that continuously retrieves knowledge base entries if they do not contain `semantic_text` and updates them accordingly. **Problem** It is possible to save empty knowledge base entries (elastic#220342) where `text` and `semantic_text` will be empty. Doing this will cause the migration script to run indefinitely leading to OOM on the affected clusters. Temporary workaround is to delete empty knowledge base entries: ```jsonc POST .kibana-observability-ai-assistant-kb/_delete_by_query { "query": { "bool": { "must": [{ "exists": { "field": "text" }}], "must_not": [ { "wildcard": { "text": "*" } } ] } } } ``` If you want to perform a dry run (find offending documents without deleting them) run this: ```jsonc GET .kibana-observability-ai-assistant-kb/_search { "query": { "bool": { "must": [{ "exists": { "field": "text" }}], "must_not": [ { "wildcard": { "text": "*" } } ] } } } ``` (cherry picked from commit 96d1692)
Contributor
|
Pinging @elastic/obs-ai-assistant (Team:Obs AI Assistant) |
Contributor
💚 Build Succeeded
Metrics [docs]
|
viduni94
approved these changes
May 14, 2025
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.
Backport
This will backport the following commits from
mainto9.0:Questions ?
Please refer to the Backport tool documentation