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

Default visualize query shouldn't include analyze_wildcard parameter #12925

Closed
lukasolson opened this issue Jul 17, 2017 · 2 comments · Fixed by #12938
Closed

Default visualize query shouldn't include analyze_wildcard parameter #12925

lukasolson opened this issue Jul 17, 2017 · 2 comments · Fixed by #12938
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Visualizations Generic visualization features (in case no more specific feature label is available) PR sent

Comments

@lukasolson
Copy link
Member

lukasolson commented Jul 17, 2017

In advanced settings, there is a query:queryString:options setting that allows you to choose what options are included in your query_string queries to Elasticsearch. It defaults to {"analyze_wildcard": true}. It's possible to override this parameter.

However, if you do set it to {}, and go to visualize, the query that's sent to Elasticsearch still has the {"analyze_wildcard": true}. In fact, no matter what you set the advanced setting to, this parameter will always be sent.

I checked 6.0.0-alpha2 and this was not the behavior, so it looks like it was probably introduced as part of the visualize refactor. The default query should probably just be {"query_string": {"query": "*"}}.

@lukasolson lukasolson added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) bug Fixes for quality problems that affect the customer experience labels Jul 17, 2017
@lukasolson
Copy link
Member Author

Related piece of code:

query: searchSource.getOwn('query') || { query_string: { analyze_wildcard: true, query: '*' } },

Also, there are a few other places analyze_wildcard seems to be hardcoded.

@Bargs
Copy link
Contributor

Bargs commented Jul 17, 2017

Funny, I stumbled across this addition in my kuery PR as well. Dunno why it was added in the refactor, but I agree it shouldn't be there.

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:Visualizations Generic visualization features (in case no more specific feature label is available) PR sent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants