opensearch-project / OpenSearch-Dashboards

📊 Open source visualization dashboards for OpenSearch.
https://opensearch.org/docs/latest/dashboards/index/
Apache License 2.0
1.69k stars 893 forks source link

[BUG] Can't view surrounding documents when there's a "+" in the id #5711

Open AB027PS opened 10 months ago

AB027PS commented 10 months ago

Describe the bug

When I go to discover, find some documents using an index pattern and then try to view surrounding documents of one of them, I get an error that says "Unable to fetch anchor document". This only happens to when the _id of the document contains a plus sign. If I substitute %2B for + in the URL in the new window, it works.

To Reproduce Steps to reproduce the behavior:

  1. Create an index and several documents for it whose _id will contain a plus sign.
  2. Create an index pattern for your index.
  3. Go to discover, select your index pattern and find a document.
  4. Click on the magnifying glass sign next to a document and the view surrounding documents.

Expected behavior A new window will open with surrounding documents

OpenSearch Version 2.11 Docker image 2.11.1

Dashboards Version 2.11 Docker image 2.11.1

Plugins

N/A

Screenshots

image image

Host/Environment (please complete the following information):

Additional context

Add any other context about the problem here.

kavilla commented 9 months ago

@abbyhu2000 can you check if this is being addressed already in 2.12 or still need to be fixed by 2.13. Check if regression issue prior to new Discover. If it's existing issue (prior to new Discover) then it might be worth considering if it should be backported and released.

kavilla commented 9 months ago

This could be an issue with encoding and maybe will have to do a patch to fix this.

kavilla commented 9 months ago

Follow up: Do we need better documentation on characters that need to be supported within OpenSearch and OpenSearch Dashboards. Can I insert 我是

abbyhu2000 commented 9 months ago

just confirmed: this is a regression of release 2.11 discover. Legacy discover in 2.10 does not have this bug. Should we target to fix this? @kavilla @ananzh @ashwin-pc

The following video is from 2.10 branch:

https://github.com/opensearch-project/OpenSearch-Dashboards/assets/43937633/7cba6e38-54a7-43c0-b67a-732ffa688ac1

abbyhu2000 commented 8 months ago

Should fix this in 2.13

ashwin-pc commented 8 months ago

@AB027PS This should be fixed in the 2.12 release https://github.com/opensearch-project/OpenSearch-Dashboards/pull/5776. Can you verify?

AB027PS commented 8 months ago

Hi @ashwin-pc I tried it with version 2.12 in Docker and the bug is still there.

smortex commented 3 days ago

Same issue seems to happen when the id has a @ character (converted to %40 in the address bar) as of today with OpenSearch 2.18 (we have not checked before).

Replacing the %40 with @ also help as a workaround.