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] Search query is not saved when clicking on a link with saved search #9016

Open
elmbrain opened this issue Dec 6, 2024 · 0 comments
Open
Labels
bug Something isn't working untriaged

Comments

@elmbrain
Copy link

elmbrain commented Dec 6, 2024

Describe the bug

The search query is not saved when you click on a link with saved search. It can be either a short link or a full link, with all the request parameters. It can be seen that in the request parameters contain

query:(language:lucene,query: test)

or

query:(language:kuery,query: test)

but when the page loads, the line disappears from the search. This is most likely due to the order in which the parameters are applied. The search parameter is applied first, and then it is overwritten by the saved search.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Discover'
  2. Select index-pattern for search
  3. Click "Save" and save search
  4. Click "Open", select saved search
  5. On the left upper corner you can see "Discover/${your_saved_search}"
  6. Enter something in the search bar
  7. Press "Share"->"Copy link"
  8. Open the tab and follow the link
  9. You will see that the search parameter has disappeared and it has disappeared from the query string
  10. If in the same tab you follow the full link with search parameters, then everything works correctly

Expected behavior
It is expected that the link will open a search with the saved search parameter and search string

OpenSearch Version
2.18.0

Dashboards Version
2.18.0

Plugins
Only default plugins and Security

Screenshots

image image

Host/Environment (please complete the following information):

  • OS: macos
  • Firefox/Chrome

Additional context

Full link of search

https://test-cluster.com/app/data-explorer/discover/#/view/17562920-b3e5-11ef-9242-cd847e376417?_q=(filters:!(),query:(language:kuery,query:Connection))&_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(discover:(columns:!(_source),isDirty:!f,savedSearch:'17562920-b3e5-11ef-9242-cd847e376417',sort:!()),metadata:(indexPattern:'security-auditlog-*',view:discover))

Search link after follow

https://test-cluster.com/app/data-explorer/discover/#/view/17562920-b3e5-11ef-9242-cd847e376417?_q=(filters:!(),query:(language:kuery,query:''))&_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-15m,to:now))&_a=(discover:(columns:!(_source),isDirty:!f,savedSearch:'17562920-b3e5-11ef-9242-cd847e376417',sort:!()),metadata:(indexPattern:'security-auditlog-*',view:discover))

Search query param erased

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