Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[8.16] [Security GenAI][BUG] Knowledge Base: Show only indices with &…
…#x60;semantic_text` fields (#198707) (#198906) # Backport This will backport the following commits from `main` to `8.16`: - [[Security GenAI][BUG] Knowledge Base: Show only indices with `semantic_text` fields (#198707)](#198707) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Ievgen Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-11-05T10:12:33Z","message":"[Security GenAI][BUG] Knowledge Base: Show only indices with `semantic_text` fields (#198707)\n\n## Summary\r\n\r\nThis is a fix the next issue:\r\n\r\n> Index input should only list indices with semantic_text fields, not\r\nall indices.\r\n\r\n### Current behaviour\r\n\r\nWe show all available indices\r\n\r\n<img width=\"1311\" alt=\"Screenshot 2024-11-01 at 18 14 36\"\r\nsrc=\"https://github.com/user-attachments/assets/cf9d08fd-a809-4530-b653-d12b8e643e45\">\r\n\r\n### Behaviour after the fix\r\n\r\nWe show only indices with `semantic_text` fields\r\n\r\n<img width=\"1311\" alt=\"Screenshot 2024-11-01 at 18 08 29\"\r\nsrc=\"https://github.com/user-attachments/assets/864b5552-aece-4cc6-848a-8f73f88f55dc\">\r\n\r\n### Testing notes\r\n\r\nCreate some indices with `semantic_text` fields. For example, you can do\r\nthat via uploading and indexing a PDF file:\r\n\r\n1. Navigate to Integrations page\r\n2. Select \"Upload a file\"\r\n3. Select and upload a PDF file\r\n4. Press Import button\r\n5. Switch to Advanced tab\r\n6. Fill in \"Index name\"\r\n7. Add additional field > Add semantic text field > Fill in form\r\n * Field: `attachment.content`\r\n * Copy to field: `content`\r\n * Inference endpoint: `elser_model_2`\r\n8. Press Add button\r\n9. Press Import button\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"b122722d886b66431108a33d0eac2447a63da179","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: SecuritySolution","Team:Security Generative AI","backport:version","v8.17.0","v8.16.1"],"title":"[Security GenAI][BUG] Knowledge Base: Show only indices with `semantic_text` fields","number":198707,"url":"https://github.com/elastic/kibana/pull/198707","mergeCommit":{"message":"[Security GenAI][BUG] Knowledge Base: Show only indices with `semantic_text` fields (#198707)\n\n## Summary\r\n\r\nThis is a fix the next issue:\r\n\r\n> Index input should only list indices with semantic_text fields, not\r\nall indices.\r\n\r\n### Current behaviour\r\n\r\nWe show all available indices\r\n\r\n<img width=\"1311\" alt=\"Screenshot 2024-11-01 at 18 14 36\"\r\nsrc=\"https://github.com/user-attachments/assets/cf9d08fd-a809-4530-b653-d12b8e643e45\">\r\n\r\n### Behaviour after the fix\r\n\r\nWe show only indices with `semantic_text` fields\r\n\r\n<img width=\"1311\" alt=\"Screenshot 2024-11-01 at 18 08 29\"\r\nsrc=\"https://github.com/user-attachments/assets/864b5552-aece-4cc6-848a-8f73f88f55dc\">\r\n\r\n### Testing notes\r\n\r\nCreate some indices with `semantic_text` fields. For example, you can do\r\nthat via uploading and indexing a PDF file:\r\n\r\n1. Navigate to Integrations page\r\n2. Select \"Upload a file\"\r\n3. Select and upload a PDF file\r\n4. Press Import button\r\n5. Switch to Advanced tab\r\n6. Fill in \"Index name\"\r\n7. Add additional field > Add semantic text field > Fill in form\r\n * Field: `attachment.content`\r\n * Copy to field: `content`\r\n * Inference endpoint: `elser_model_2`\r\n8. Press Add button\r\n9. Press Import button\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"b122722d886b66431108a33d0eac2447a63da179"}},"sourceBranch":"main","suggestedTargetBranches":["8.x","8.16"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/198707","number":198707,"mergeCommit":{"message":"[Security GenAI][BUG] Knowledge Base: Show only indices with `semantic_text` fields (#198707)\n\n## Summary\r\n\r\nThis is a fix the next issue:\r\n\r\n> Index input should only list indices with semantic_text fields, not\r\nall indices.\r\n\r\n### Current behaviour\r\n\r\nWe show all available indices\r\n\r\n<img width=\"1311\" alt=\"Screenshot 2024-11-01 at 18 14 36\"\r\nsrc=\"https://github.com/user-attachments/assets/cf9d08fd-a809-4530-b653-d12b8e643e45\">\r\n\r\n### Behaviour after the fix\r\n\r\nWe show only indices with `semantic_text` fields\r\n\r\n<img width=\"1311\" alt=\"Screenshot 2024-11-01 at 18 08 29\"\r\nsrc=\"https://github.com/user-attachments/assets/864b5552-aece-4cc6-848a-8f73f88f55dc\">\r\n\r\n### Testing notes\r\n\r\nCreate some indices with `semantic_text` fields. For example, you can do\r\nthat via uploading and indexing a PDF file:\r\n\r\n1. Navigate to Integrations page\r\n2. Select \"Upload a file\"\r\n3. Select and upload a PDF file\r\n4. Press Import button\r\n5. Switch to Advanced tab\r\n6. Fill in \"Index name\"\r\n7. Add additional field > Add semantic text field > Fill in form\r\n * Field: `attachment.content`\r\n * Copy to field: `content`\r\n * Inference endpoint: `elser_model_2`\r\n8. Press Add button\r\n9. Press Import button\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios","sha":"b122722d886b66431108a33d0eac2447a63da179"}},{"branch":"8.x","label":"v8.17.0","branchLabelMappingKey":"^v8.17.0$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"8.16","label":"v8.16.1","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT--> Co-authored-by: Ievgen Sorokopud <[email protected]>
- Loading branch information