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

[Discover] Context view doesn't work when there are encoded special chars in the id given by URL #122638

Closed
kertal opened this issue Jan 11, 2022 · 1 comment · Fixed by #122737
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application loe:small Small Level of Effort regression Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.

Comments

@kertal
Copy link
Member

kertal commented Jan 11, 2022

Kibana version:
7.16

Describe the bug:

Given the id of a document in Elasticsearch contains an id with a special character like + "View surrounding documents" no longer works.

Steps to reproduce:

  1. Create a document containing a + in its id
PUT context/_doc/1+1=2
{
  "timestamp":"2022-01-10T09:30:23",
  "name":"test"
}
  1. Create a data view
  2. Navigate to Discover, adapt time range so you can find the document
  3. Expand the document and click on "View surrounding documents"

Expected behavior:

You should be able to see the document and its surroundings

Screenshots (if relevant):
Bildschirmfoto 2022-01-11 um 10 58 51

Any additional context:
We switched Angular to react router recently (#107042), now it seems the id param of the URL is no longer decoded. That's why the document can't be found. You can test it in DevTools

PUT context/_doc/1+1=2
{
  "timestamp":"2022-01-10T09:30:23",
  "name":""
}

#this works
GET _search
{
  "query": {
    "ids": {
      "values":["1+1=2"]
    }
  }
}

#this doesn't work, and that's why it doesn't work in Discover context
GET _search
{
  "query": {
    "ids": {
      "values":["1%2B1%3D2"]
    }
  }
}
@kertal kertal added bug Fixes for quality problems that affect the customer experience Feature:Discover Discover Application regression Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL. labels Jan 11, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

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 Feature:Discover Discover Application loe:small Small Level of Effort regression Team:DataDiscovery Discover, search (e.g. data plugin and KQL), data views, saved searches. For ES|QL, use Team:ES|QL.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants