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

query:queryString:options setting doesn't revert when deleted #11463

Closed
LeeDr opened this issue Apr 27, 2017 · 2 comments
Closed

query:queryString:options setting doesn't revert when deleted #11463

LeeDr opened this issue Apr 27, 2017 · 2 comments
Labels
bug Fixes for quality problems that affect the customer experience Feature:Search Querying infrastructure in Kibana Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@LeeDr
Copy link

LeeDr commented Apr 27, 2017

Might be related to #4040

This works the same on 5.2.0 so it's not a regression since then.

Kibana version: 5.4.0

Elasticsearch version: 5.4.0

Server OS version: CentOS 7

Browser version: Chrome

Browser OS version: Windows 10

Original install method (e.g. download page, yum, from source, etc.): .rpm

Description of the problem including expected versus actual behavior:
if I set Advanced Settings query:queryString:options , run a query, go back and delete my setting (to set it back to the default), and then go back to Discover and search again, it still uses the setting I deleted.
Changing the search query clears it. See steps 8 and 9 below where the expected result is not correct.
So this seems like some kind of caching we do of the query until we change the search in the query bar?

Steps to reproduce:

  1. In Advanced Settings set query:queryString:options to { "analyze_wildcard": true, "fuzziness": 2} and save
  2. go to Dev Tools > Console and query GET .kibana/config/_search and you should see "query:queryString:options": """{ "analyze_wildcard": true, "fuzziness": 2}"""
  3. go to Discover, select a time-based index, do a search, collapse the histogram with the arrow to get to the "spy panel"
  4. click the Request button and see that the query string looks like
"query_string": {
            "analyze_wildcard": true,
            "fuzziness": 2,
            "query": "*"
          }
  1. go back to Advanced Settings and click delete for your query:queryString:options setting
  2. go back to Console and run the same query. Now I see;
    "query:queryString:options": null
  3. go back to Discover DON'T change the search but just click the Search magnifying glass.
  4. collapse the histogram and click the Request button. you still see the "fuzziness": 2 but shouldn't
  5. Refresh the browser page and check again, you still see the "fuzziness": 2 but shouldn't
  6. change the search in the query bar to anything and search again. Now the "fuzziness": 2 finally is cleared.

Errors in browser console (if relevant):

Provide logs and/or server output (if relevant):

Describe the feature:

@LeeDr LeeDr added :Discovery bug Fixes for quality problems that affect the customer experience labels Apr 27, 2017
@Bargs
Copy link
Contributor

Bargs commented Apr 28, 2017

The issue is that the query (full dsl) is stored in the app state, so even if you refresh the same query is run again. This makes a fix problematic because we can't tell if the query was generated automatically by us, or if the user entered the query DSL into the query bar manually. If it was the latter, we don't want to reset it.

Eventually we can fix this in the process of working on #10789 because I'm thinking we'll store the query string in the app state instead of the DSL.

@timroes timroes added Feature:Search Querying infrastructure in Kibana Team:Visualizations Visualization editors, elastic-charts and infrastructure and removed :Discovery labels Sep 16, 2018
@lukasolson
Copy link
Member

This has been resolved.

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:Search Querying infrastructure in Kibana Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants