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

[search source] Stop building invalid queries and then rewriting them #60954

Merged
merged 13 commits into from
Apr 22, 2020

Conversation

wylieconlon
Copy link
Contributor

@wylieconlon wylieconlon commented Mar 23, 2020

It appears that this was a compatibility layer added many years ago, but never removed. This finally removes it.

Checklist

@wylieconlon wylieconlon changed the title Stop rewriting invalid filters in search source [search source] Stop building invalid queries and then rewriting them Apr 17, 2020
@wylieconlon wylieconlon added Feature:Search Querying infrastructure in Kibana release_note:skip Skip the PR/issue when compiling release notes Team:AppArch v7.8.0 v8.0.0 labels Apr 17, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@wylieconlon wylieconlon marked this pull request as ready for review April 17, 2020 18:40
@wylieconlon wylieconlon requested a review from a team as a code owner April 17, 2020 18:40
@lizozom
Copy link
Contributor

lizozom commented Apr 19, 2020

@wylieconlon code seems LGTM, however would you mind giving some pointers on how to test this?

@wylieconlon
Copy link
Contributor Author

wylieconlon commented Apr 20, 2020

@lizozom Sure, the way to test this is by using the Filters aggregation. I tested with two steps:

  • Create a bar chart visualization using the Filters aggregation
  • For filters, use both KQL and Lucene syntax
    • For example, bytes > 1000 and bytes: {1000 TO *}
  • You should see 2 bars with the same data
  • Also, if you click on one of the bars, a filter should be added to the filter manager

It's also a good idea to test a migration, such as from 7.6 to this snapshot, using the same configuration. The filters should all work.

@wylieconlon
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@lukeelmers lukeelmers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM. Tested locally (Chrome macOS):

✔️ created filters agg in a bar chart using both kql and lucene, same results.
✔️ verified filters manager still works when clicking on a bar for both kql and lucene.
✔️ exported vis with same configuration from 6.8.8 cloud instance. imported into this branch. verified all of the above still work as expected.

@wylieconlon Thanks for this cleanup!

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@wylieconlon wylieconlon merged commit 4fc1c5f into elastic:master Apr 22, 2020
@wylieconlon wylieconlon deleted the fix-filter-generation branch April 22, 2020 21:42
wylieconlon pushed a commit to wylieconlon/kibana that referenced this pull request Apr 22, 2020
…elastic#60954)

* Stop rewriting invalid filters in search source

* Fix type issue

* Use automated fixing tool

* Update test

* Fix test

* Fix docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
wylieconlon pushed a commit that referenced this pull request Apr 23, 2020
…#60954) (#64259)

* Stop rewriting invalid filters in search source

* Fix type issue

* Use automated fixing tool

* Update test

* Fix test

* Fix docs

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Search Querying infrastructure in Kibana release_note:skip Skip the PR/issue when compiling release notes v7.8.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants