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

[BUG] OpenSearch only ingests and stores the first element of an array and discards the rest #680

Open
A-Gray-Cat opened this issue Sep 19, 2024 · 0 comments
Labels
bug Something isn't working untriaged

Comments

@A-Gray-Cat
Copy link

What is the bug?
When ingesting documents, or creating a materialized view / covering index in OpenSearch, if the original log line includes a JSON array (see example below), after ingestion (or materalized view / covering index creation), only the first element of the JSON array would get ingested and stored, and the rest of them would get discarded.

  • Original log line
{
    ...
    "resources": [{"name": "bucket1"}, {"name": "bucket2"}, {"name": "bucket3"}]
}
  • After ingestion or MV/CI creation
{
    ...
    "resources": {"name": "bucket1"}

}

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Identify an original log line that includes an array.
  2. Either using the ingestion pipeline, or create a MV/CI to ingest that identified log line.
  3. Run a query to select that field, e.g. SELECT resources FROM table

What is the expected behavior?
The retrieved field will be the first element of the array, and the rest of elements of the array got discarded.

What is your host/environment?

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Plugins

Do you have any screenshots?
If applicable, add screenshots to help explain your problem.

Do you have any additional context?
Add any other context about the problem.

@A-Gray-Cat A-Gray-Cat added bug Something isn't working untriaged labels Sep 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

1 participant