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] Can't view surrounding documents when there's a "+" in the id #5711

Open
AB027PS opened this issue Jan 19, 2024 · 8 comments · May be fixed by #8869
Open

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

AB027PS opened this issue Jan 19, 2024 · 8 comments · May be fixed by #8869
Labels
bug Something isn't working discover for discover reinvent

Comments

@AB027PS
Copy link

AB027PS commented Jan 19, 2024

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):

  • OS: Linux
  • Browser and version 120.0.6099.218 (Official Build) (64-bit)

Additional context

Add any other context about the problem here.

@AB027PS AB027PS added bug Something isn't working untriaged labels Jan 19, 2024
@AB027PS AB027PS changed the title [BUG] [BUG] Can't view surrounding documents Jan 19, 2024
@wbeckler wbeckler changed the title [BUG] Can't view surrounding documents [BUG] Can't view surrounding documents when there's a "+" in the id Jan 30, 2024
@ananzh ananzh added the discover for discover reinvent label Feb 7, 2024
@kavilla
Copy link
Member

kavilla commented Feb 20, 2024

@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
Copy link
Member

kavilla commented Feb 20, 2024

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

@kavilla
Copy link
Member

kavilla commented Feb 20, 2024

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

@abbyhu2000
Copy link
Member

abbyhu2000 commented Feb 20, 2024

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:

Screen.Recording.2024-02-20.at.3.19.13.PM.mov

@abbyhu2000
Copy link
Member

Should fix this in 2.13

@ashwin-pc
Copy link
Member

@AB027PS This should be fixed in the 2.12 release #5776. Can you verify?

@AB027PS
Copy link
Author

AB027PS commented Mar 6, 2024

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

@smortex
Copy link

smortex commented Nov 14, 2024

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.

smortex added a commit to smortex/OpenSearch-Dashboards that referenced this issue Nov 14, 2024
When viewing surrounding documents of a document which id contains chars
such as `@` or `+`, these chars are encoded, preventing OpenSearch from
finding the requested document.

Decode the id to transform back the URI encoded chars to the actual
chars in the document id to find it and unbreak the feature.

Fixes opensearch-project#5711

Signed-off-by: Romain Tartière <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working discover for discover reinvent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants