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] [2.15]: Nested/Object Field Arrays Display Incorrectly #9318

Open
rayangou opened this issue Jan 31, 2025 · 0 comments
Open

[BUG] [2.15]: Nested/Object Field Arrays Display Incorrectly #9318

rayangou opened this issue Jan 31, 2025 · 0 comments
Labels
bug Something isn't working untriaged

Comments

@rayangou
Copy link

Describe the bug

In OpenSearch Dashboards, the first object in a nested field array incorrectly displays all array values from adjacent objects. This issue does not occur when querying OpenSearch directly.

To Reproduce
Steps to reproduce the behavior:

  1. Create an index test-nested-array with the following mapping:
"nested_test1": {
  "type": "nested",
  "properties": {
    "d_values": {
      "type": "double"
    },
    "s_entry": {
      "type": "keyword"
    }
  }
}
  1. Add documents like the one below:
{
  "nested_test1": [
    {
      "d_values": [0.1, 0.2],
      "s_entry": "4"
    },
    {
      "d_values": [0.3, 0.4],
      "s_entry": "5"
    },
    {
      "d_values": [0.5, 0.6],
      "s_entry": "6"
    }
  ]
}

  1. Go to OpenSearch Dashboards and create an index pattern for the test-nested-array index.
  2. Expand the record and click on the JSON view.
  3. Observe that the first object in the nested_test1 array displays all the array values of its adjacent objects.
  4. Example of the observed behavior:
"nested_test1": [
  {
    "d_values": [
      [0.1, 0.2],
      [0.3, 0.4],
      [0.5, 0.6]
    ],
    "s_entry": "1"
  },
  {
    "d_values": [0.3, 0.4],
    "s_entry": "2"
  },
  {
    "d_values": [0.5, 0.6],
    "s_entry": "3"
  }
]

Expected behavior
The first object in the nested_test1 array should not include values from adjacent objects. The expected output is:

"nested_test1": [
  {
    "d_values": [0.1, 0.2],
    "s_entry": "1"
  },
  {
    "d_values": [0.3, 0.4],
    "s_entry": "2"
  },
  {
    "d_values": [0.5, 0.6],
    "s_entry": "3"
  }
]

OpenSearch Version
2.15

Dashboards Version
2.15

Plugins

Security, Alerting,

Screenshots

Image

Host/Environment (please complete the following information):

  • OS: CentOS
  • Browser and version Chrome

Additional context

This issue appears to be specific to OpenSearch Dashboards handling of nested/Object array fields in the JSON view.

@rayangou rayangou added bug Something isn't working untriaged labels Jan 31, 2025
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