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

[Security Solution] [Bug] Index Values are not available in dropdown under New Index Enter for Knowledge Base. #199610

Closed
arvindersingh-qasource opened this issue Nov 11, 2024 · 8 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience fixed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed v8.16.1 v8.17.0 v9.0.0

Comments

@arvindersingh-qasource
Copy link

Describe the bug
Index Values are not available in dropdown under New Index Enter for Knowledge Base.

Kibana/Elasticsearch Stack version

VERSION: 8.16.0 BC5
BUILD: 79644
COMMIT: a8a07dfc586d78b8f4b7997b00e126363d68c043

Pre Conditions

  1. Kibana v8.16.0 build be must be available
  2. AI Connector must be configured.
  3. Bulk Alerts must be present on Kibana.
  4. Entity Score must be enabled.
  5. Knowledge Base must be setup.

Steps

  1. Navigate to Management -> AI Assistant - Knowledge Base
  2. Click on ➕ New button and select Index option.
  3. For Index field, Observe that Index Values are not available in dropdown.

Expected Result
Index Values should be available in dropdown under New Index Enter for Knowledge Base.

Screen Shot

Image

@arvindersingh-qasource arvindersingh-qasource added bug Fixes for quality problems that affect the customer experience impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. Team:Security Generative AI Security Generative AI triage_needed v8.16.0 labels Nov 11, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@arvindersingh-qasource
Copy link
Author

@muskangulati-qasource Please review this ticket.

Thanks.

@muskangulati-qasource
Copy link

Reviewed and assigned to @MadameSheema

@jamesspi
Copy link

This is expected, as we fixed a bug that ensures only indices with semantic_text fields are shown in this list.

Here's how you can test this:

  • Enable and initialize the knowledge base from the AI Assistant settings in stack management (You've already done this)
  • Run this command in dev tools:
PUT kb-pdfs
{
  "mappings": {
  "properties": {
    "attachment": {
      "properties": {
        "content": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "content_length": {
          "type": "long"
        },
        "content_type": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "format": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "language": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    },
    "content": {
      "type": "semantic_text",
      "inference_id": "elastic-security-ai-assistant-elser2"
    }
    }
}
}

That creates an index with a mapping that should enable it to show up the the indices drop down.

@e40pud
Copy link
Contributor

e40pud commented Nov 13, 2024

There is a valid bug related to the description. At the moment we consider indices with the semantic_text field type only when the field is named content. Any other indices with semantic_text fields won't appear in the dropdown menu.

To see the issue, run this command in dev tools:

PUT kb-pdfs-2
{
  "mappings": {
  "properties": {
    "attachment": {
      "properties": {
        "content": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "content_length": {
          "type": "long"
        },
        "content_type": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "format": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "language": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    },
    "content2": {
      "type": "semantic_text",
      "inference_id": "elastic-security-ai-assistant-elser2"
    }
    }
}
}

You won't see the index kb-pdfs-2 in the dropdown menu since the semantic_text field has name content2.

cc @MadameSheema

@e40pud e40pud self-assigned this Nov 13, 2024
e40pud added a commit to e40pud/kibana that referenced this issue Nov 13, 2024
e40pud added a commit that referenced this issue Nov 18, 2024
…under New Index Enter for Knowledge Base. (#199610) (#199990)

## Summary

This PR fixes the issue described here
#199610 (comment)

In short, we do not show all indices with `semantic_text` fields. We
only show those which have `semantic_text` fields named `content`.

### Testing notes

Add the index with the `semantic_text` field by running this command in
dev tools:

```
PUT test_index
{
  "mappings": {
  "properties": {
    "attachment": {
      "properties": {
        "content": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "content_length": {
          "type": "long"
        },
        "content_type": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "format": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "language": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    },
    "content2": {
      "type": "semantic_text",
      "inference_id": "elastic-security-ai-assistant-elser2"
    }
    }
}
}
```

You should see the `test_index` index in the `Knowledge Base > New >
Index > Index (dropdown)`.

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [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

---------

Co-authored-by: Steph Milovic <[email protected]>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 18, 2024
…under New Index Enter for Knowledge Base. (elastic#199610) (elastic#199990)

## Summary

This PR fixes the issue described here
elastic#199610 (comment)

In short, we do not show all indices with `semantic_text` fields. We
only show those which have `semantic_text` fields named `content`.

### Testing notes

Add the index with the `semantic_text` field by running this command in
dev tools:

```
PUT test_index
{
  "mappings": {
  "properties": {
    "attachment": {
      "properties": {
        "content": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "content_length": {
          "type": "long"
        },
        "content_type": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "format": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "language": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    },
    "content2": {
      "type": "semantic_text",
      "inference_id": "elastic-security-ai-assistant-elser2"
    }
    }
}
}
```

You should see the `test_index` index in the `Knowledge Base > New >
Index > Index (dropdown)`.

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [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

---------

Co-authored-by: Steph Milovic <[email protected]>
(cherry picked from commit 5ab39e5)
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Nov 18, 2024
…under New Index Enter for Knowledge Base. (elastic#199610) (elastic#199990)

## Summary

This PR fixes the issue described here
elastic#199610 (comment)

In short, we do not show all indices with `semantic_text` fields. We
only show those which have `semantic_text` fields named `content`.

### Testing notes

Add the index with the `semantic_text` field by running this command in
dev tools:

```
PUT test_index
{
  "mappings": {
  "properties": {
    "attachment": {
      "properties": {
        "content": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "content_length": {
          "type": "long"
        },
        "content_type": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "format": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "language": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    },
    "content2": {
      "type": "semantic_text",
      "inference_id": "elastic-security-ai-assistant-elser2"
    }
    }
}
}
```

You should see the `test_index` index in the `Knowledge Base > New >
Index > Index (dropdown)`.

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [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

---------

Co-authored-by: Steph Milovic <[email protected]>
(cherry picked from commit 5ab39e5)
jesuswr pushed a commit to jesuswr/kibana that referenced this issue Nov 18, 2024
…under New Index Enter for Knowledge Base. (elastic#199610) (elastic#199990)

## Summary

This PR fixes the issue described here
elastic#199610 (comment)

In short, we do not show all indices with `semantic_text` fields. We
only show those which have `semantic_text` fields named `content`.

### Testing notes

Add the index with the `semantic_text` field by running this command in
dev tools:

```
PUT test_index
{
  "mappings": {
  "properties": {
    "attachment": {
      "properties": {
        "content": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "content_length": {
          "type": "long"
        },
        "content_type": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "format": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "language": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    },
    "content2": {
      "type": "semantic_text",
      "inference_id": "elastic-security-ai-assistant-elser2"
    }
    }
}
}
```

You should see the `test_index` index in the `Knowledge Base > New >
Index > Index (dropdown)`.

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [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

---------

Co-authored-by: Steph Milovic <[email protected]>
kibanamachine added a commit that referenced this issue Nov 18, 2024
…pdown under New Index Enter for Knowledge Base. (#199610) (#199990) (#200609)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Security Solution] [Bug] Index Values are not available in dropdown
under New Index Enter for Knowledge Base. (#199610)
(#199990)](#199990)

<!--- 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-18T16:23:05Z","message":"[Security
Solution] [Bug] Index Values are not available in dropdown under New
Index Enter for Knowledge Base. (#199610) (#199990)\n\n##
Summary\r\n\r\nThis PR fixes the issue described
here\r\nhttps://github.com//issues/199610#issuecomment-2473393109\r\n\r\nIn
short, we do not show all indices with `semantic_text` fields.
We\r\nonly show those which have `semantic_text` fields named
`content`.\r\n\r\n### Testing notes\r\n\r\nAdd the index with the
`semantic_text` field by running this command in\r\ndev
tools:\r\n\r\n```\r\nPUT test_index\r\n{\r\n \"mappings\": {\r\n
\"properties\": {\r\n \"attachment\": {\r\n \"properties\": {\r\n
\"content\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"content_length\": {\r\n \"type\": \"long\"\r\n
},\r\n \"content_type\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"format\": {\r\n \"type\": \"text\",\r\n \"fields\":
{\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\":
256\r\n }\r\n }\r\n },\r\n \"language\": {\r\n \"type\": \"text\",\r\n
\"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n
\"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"content2\":
{\r\n \"type\": \"semantic_text\",\r\n \"inference_id\":
\"elastic-security-ai-assistant-elser2\"\r\n }\r\n
}\r\n}\r\n}\r\n```\r\n\r\nYou should see the `test_index` index in the
`Knowledge Base > New >\r\nIndex > Index (dropdown)`.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [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\r\n\r\n---------\r\n\r\nCo-authored-by: Steph Milovic
<[email protected]>","sha":"5ab39e5a413f426da232723317786321a7d57fc7","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:
SecuritySolution","Team:Security Generative
AI","backport:version","v8.17.0","v8.16.1"],"title":"[Security Solution]
[Bug] Index Values are not available in dropdown under New Index Enter
for Knowledge Base.
(#199610)","number":199990,"url":"https://github.com/elastic/kibana/pull/199990","mergeCommit":{"message":"[Security
Solution] [Bug] Index Values are not available in dropdown under New
Index Enter for Knowledge Base. (#199610) (#199990)\n\n##
Summary\r\n\r\nThis PR fixes the issue described
here\r\nhttps://github.com//issues/199610#issuecomment-2473393109\r\n\r\nIn
short, we do not show all indices with `semantic_text` fields.
We\r\nonly show those which have `semantic_text` fields named
`content`.\r\n\r\n### Testing notes\r\n\r\nAdd the index with the
`semantic_text` field by running this command in\r\ndev
tools:\r\n\r\n```\r\nPUT test_index\r\n{\r\n \"mappings\": {\r\n
\"properties\": {\r\n \"attachment\": {\r\n \"properties\": {\r\n
\"content\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"content_length\": {\r\n \"type\": \"long\"\r\n
},\r\n \"content_type\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"format\": {\r\n \"type\": \"text\",\r\n \"fields\":
{\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\":
256\r\n }\r\n }\r\n },\r\n \"language\": {\r\n \"type\": \"text\",\r\n
\"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n
\"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"content2\":
{\r\n \"type\": \"semantic_text\",\r\n \"inference_id\":
\"elastic-security-ai-assistant-elser2\"\r\n }\r\n
}\r\n}\r\n}\r\n```\r\n\r\nYou should see the `test_index` index in the
`Knowledge Base > New >\r\nIndex > Index (dropdown)`.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [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\r\n\r\n---------\r\n\r\nCo-authored-by: Steph Milovic
<[email protected]>","sha":"5ab39e5a413f426da232723317786321a7d57fc7"}},"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/199990","number":199990,"mergeCommit":{"message":"[Security
Solution] [Bug] Index Values are not available in dropdown under New
Index Enter for Knowledge Base. (#199610) (#199990)\n\n##
Summary\r\n\r\nThis PR fixes the issue described
here\r\nhttps://github.com//issues/199610#issuecomment-2473393109\r\n\r\nIn
short, we do not show all indices with `semantic_text` fields.
We\r\nonly show those which have `semantic_text` fields named
`content`.\r\n\r\n### Testing notes\r\n\r\nAdd the index with the
`semantic_text` field by running this command in\r\ndev
tools:\r\n\r\n```\r\nPUT test_index\r\n{\r\n \"mappings\": {\r\n
\"properties\": {\r\n \"attachment\": {\r\n \"properties\": {\r\n
\"content\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"content_length\": {\r\n \"type\": \"long\"\r\n
},\r\n \"content_type\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"format\": {\r\n \"type\": \"text\",\r\n \"fields\":
{\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\":
256\r\n }\r\n }\r\n },\r\n \"language\": {\r\n \"type\": \"text\",\r\n
\"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n
\"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"content2\":
{\r\n \"type\": \"semantic_text\",\r\n \"inference_id\":
\"elastic-security-ai-assistant-elser2\"\r\n }\r\n
}\r\n}\r\n}\r\n```\r\n\r\nYou should see the `test_index` index in the
`Knowledge Base > New >\r\nIndex > Index (dropdown)`.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [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\r\n\r\n---------\r\n\r\nCo-authored-by: Steph Milovic
<[email protected]>","sha":"5ab39e5a413f426da232723317786321a7d57fc7"}},{"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]>
kibanamachine added a commit that referenced this issue Nov 18, 2024
…opdown under New Index Enter for Knowledge Base. (#199610) (#199990) (#200608)

# Backport

This will backport the following commits from `main` to `8.16`:
- [[Security Solution] [Bug] Index Values are not available in dropdown
under New Index Enter for Knowledge Base. (#199610)
(#199990)](#199990)

<!--- 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-18T16:23:05Z","message":"[Security
Solution] [Bug] Index Values are not available in dropdown under New
Index Enter for Knowledge Base. (#199610) (#199990)\n\n##
Summary\r\n\r\nThis PR fixes the issue described
here\r\nhttps://github.com//issues/199610#issuecomment-2473393109\r\n\r\nIn
short, we do not show all indices with `semantic_text` fields.
We\r\nonly show those which have `semantic_text` fields named
`content`.\r\n\r\n### Testing notes\r\n\r\nAdd the index with the
`semantic_text` field by running this command in\r\ndev
tools:\r\n\r\n```\r\nPUT test_index\r\n{\r\n \"mappings\": {\r\n
\"properties\": {\r\n \"attachment\": {\r\n \"properties\": {\r\n
\"content\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"content_length\": {\r\n \"type\": \"long\"\r\n
},\r\n \"content_type\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"format\": {\r\n \"type\": \"text\",\r\n \"fields\":
{\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\":
256\r\n }\r\n }\r\n },\r\n \"language\": {\r\n \"type\": \"text\",\r\n
\"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n
\"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"content2\":
{\r\n \"type\": \"semantic_text\",\r\n \"inference_id\":
\"elastic-security-ai-assistant-elser2\"\r\n }\r\n
}\r\n}\r\n}\r\n```\r\n\r\nYou should see the `test_index` index in the
`Knowledge Base > New >\r\nIndex > Index (dropdown)`.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [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\r\n\r\n---------\r\n\r\nCo-authored-by: Steph Milovic
<[email protected]>","sha":"5ab39e5a413f426da232723317786321a7d57fc7","branchLabelMapping":{"^v9.0.0$":"main","^v8.17.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:fix","v9.0.0","Team:
SecuritySolution","Team:Security Generative
AI","backport:version","v8.17.0","v8.16.1"],"title":"[Security Solution]
[Bug] Index Values are not available in dropdown under New Index Enter
for Knowledge Base.
(#199610)","number":199990,"url":"https://github.com/elastic/kibana/pull/199990","mergeCommit":{"message":"[Security
Solution] [Bug] Index Values are not available in dropdown under New
Index Enter for Knowledge Base. (#199610) (#199990)\n\n##
Summary\r\n\r\nThis PR fixes the issue described
here\r\nhttps://github.com//issues/199610#issuecomment-2473393109\r\n\r\nIn
short, we do not show all indices with `semantic_text` fields.
We\r\nonly show those which have `semantic_text` fields named
`content`.\r\n\r\n### Testing notes\r\n\r\nAdd the index with the
`semantic_text` field by running this command in\r\ndev
tools:\r\n\r\n```\r\nPUT test_index\r\n{\r\n \"mappings\": {\r\n
\"properties\": {\r\n \"attachment\": {\r\n \"properties\": {\r\n
\"content\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"content_length\": {\r\n \"type\": \"long\"\r\n
},\r\n \"content_type\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"format\": {\r\n \"type\": \"text\",\r\n \"fields\":
{\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\":
256\r\n }\r\n }\r\n },\r\n \"language\": {\r\n \"type\": \"text\",\r\n
\"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n
\"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"content2\":
{\r\n \"type\": \"semantic_text\",\r\n \"inference_id\":
\"elastic-security-ai-assistant-elser2\"\r\n }\r\n
}\r\n}\r\n}\r\n```\r\n\r\nYou should see the `test_index` index in the
`Knowledge Base > New >\r\nIndex > Index (dropdown)`.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [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\r\n\r\n---------\r\n\r\nCo-authored-by: Steph Milovic
<[email protected]>","sha":"5ab39e5a413f426da232723317786321a7d57fc7"}},"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/199990","number":199990,"mergeCommit":{"message":"[Security
Solution] [Bug] Index Values are not available in dropdown under New
Index Enter for Knowledge Base. (#199610) (#199990)\n\n##
Summary\r\n\r\nThis PR fixes the issue described
here\r\nhttps://github.com//issues/199610#issuecomment-2473393109\r\n\r\nIn
short, we do not show all indices with `semantic_text` fields.
We\r\nonly show those which have `semantic_text` fields named
`content`.\r\n\r\n### Testing notes\r\n\r\nAdd the index with the
`semantic_text` field by running this command in\r\ndev
tools:\r\n\r\n```\r\nPUT test_index\r\n{\r\n \"mappings\": {\r\n
\"properties\": {\r\n \"attachment\": {\r\n \"properties\": {\r\n
\"content\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"content_length\": {\r\n \"type\": \"long\"\r\n
},\r\n \"content_type\": {\r\n \"type\": \"text\",\r\n \"fields\": {\r\n
\"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\": 256\r\n
}\r\n }\r\n },\r\n \"format\": {\r\n \"type\": \"text\",\r\n \"fields\":
{\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n \"ignore_above\":
256\r\n }\r\n }\r\n },\r\n \"language\": {\r\n \"type\": \"text\",\r\n
\"fields\": {\r\n \"keyword\": {\r\n \"type\": \"keyword\",\r\n
\"ignore_above\": 256\r\n }\r\n }\r\n }\r\n }\r\n },\r\n \"content2\":
{\r\n \"type\": \"semantic_text\",\r\n \"inference_id\":
\"elastic-security-ai-assistant-elser2\"\r\n }\r\n
}\r\n}\r\n}\r\n```\r\n\r\nYou should see the `test_index` index in the
`Knowledge Base > New >\r\nIndex > Index (dropdown)`.\r\n\r\n###
Checklist\r\n\r\nDelete any items that are not applicable to this
PR.\r\n\r\n- [ ] [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\r\n\r\n---------\r\n\r\nCo-authored-by: Steph Milovic
<[email protected]>","sha":"5ab39e5a413f426da232723317786321a7d57fc7"}},{"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]>
@e40pud
Copy link
Contributor

e40pud commented Nov 18, 2024

@MadameSheema this bug was fixed and merged into 8.16.1, 8.17.0 and 9.0.0 and ready for QA love

@MadameSheema
Copy link
Member

@muskangulati-qasource @arvindersingh-qasource can you please validate the issue in latest 8.16.1 BC? Thanks!

@muskangulati-qasource
Copy link

Hi @MadameSheema,

We have tested this ticket on the latest 8.16.1 BC2 and found the issue is now fixed.

Please find below the testing details:

Build details

VERSION: 8.16.1
BUILD: 79724
COMMIT: c8b46e87c4d61de4fe046ce5ea0a0b68aad5acf9

Screenshots

  • The index is created successfully
    Image

  • The same index is visible under the drop down
    Image

  • The index is used and entry is created successfully
    Image

Hence, we are closing this issue and marking it as 'QA validated'.

Thanks!!

@muskangulati-qasource muskangulati-qasource added the QA:Validated Issue has been validated by QA label Nov 20, 2024
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this issue Dec 12, 2024
…under New Index Enter for Knowledge Base. (elastic#199610) (elastic#199990)

## Summary

This PR fixes the issue described here
elastic#199610 (comment)

In short, we do not show all indices with `semantic_text` fields. We
only show those which have `semantic_text` fields named `content`.

### Testing notes

Add the index with the `semantic_text` field by running this command in
dev tools:

```
PUT test_index
{
  "mappings": {
  "properties": {
    "attachment": {
      "properties": {
        "content": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "content_length": {
          "type": "long"
        },
        "content_type": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "format": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        },
        "language": {
          "type": "text",
          "fields": {
            "keyword": {
              "type": "keyword",
              "ignore_above": 256
            }
          }
        }
      }
    },
    "content2": {
      "type": "semantic_text",
      "inference_id": "elastic-security-ai-assistant-elser2"
    }
    }
}
}
```

You should see the `test_index` index in the `Knowledge Base > New >
Index > Index (dropdown)`.

### Checklist

Delete any items that are not applicable to this PR.

- [ ] [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

---------

Co-authored-by: Steph Milovic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience fixed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. QA:Validated Issue has been validated by QA Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. triage_needed v8.16.1 v8.17.0 v9.0.0
Projects
None yet
Development

No branches or pull requests

7 participants