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

AND/OR condition on multiple control filters #61748

Closed
SunithaE opened this issue Mar 29, 2020 · 6 comments
Closed

AND/OR condition on multiple control filters #61748

SunithaE opened this issue Mar 29, 2020 · 6 comments
Labels
enhancement New value added to drive a business result Feature:Input Control Input controls visualization Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas triage_needed

Comments

@SunithaE
Copy link

Describe the feature: AND/OR condition on multiple control filters.
For now, there is a parental control but when there are two control filters i dont want one to be locked until the other control filter is unlocked.
For example, in the attached image,
If filter is applied on 'Account Number', then the filter should be applied on the other control 'Account Name' too. Is there a chance to bring in this capability ?

image

@nreese nreese added enhancement New value added to drive a business result Feature:Input Control Input controls visualization Team:Visualizations Visualization editors, elastic-charts and infrastructure triage_needed labels Mar 31, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@timroes timroes added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 7, 2020
@elkargig
Copy link

I'm looking for something similar.

I have 2 document fields and I'd like to have a control that searches for a specific value (MYVALUE) in either fieldA OR fieldB. I can't create 2 separate controls/filters as they are AND-ed together.

The control filter currently creates this:

{
  "query": {
    "match": {
      "fieldA.keyword": {
        "query": "MYVALUE",
        "type": "phrase"
      }
    }
  }
}

what I'd like to create is the following:

{
  "query": {
    "bool": {
      "should": [
        {
          "match_phrase": {
            "fieldA.keyword": "MYVALUE"
          }
        },
        {
          "match_phrase": {
            "fieldB.keyword": "MYVALUE"
          }
        }
      ],
      "minimum_should_match": 1
    }
  }
}

are there any plans to support something like this ?

@ThomThomson
Copy link
Contributor

The first portion of this issue is already solved with the New Controls, which are GA in 8.3. In the new controls, the left to right hierarchy is set without the child controls being disabled until a parent is set. If you had two controls set up, one for Account Number, and one for Account Name, you could select either first.

For the second request, made by @elkargig, we are approaching that as part of the unified search project. @stratoula is there another issue in place for AND/OR relating to Unified Search? If so, we should close this issue in favour of that one.

@stratoula
Copy link
Contributor

@ThomThomson yes we have this one #127247 It doesn't mention the integration with controls, it is mostly focused on the unified search changes (the filter bar UI and the backend)
Maybe we need a separate issue for tracking the integration with controls, wdyt?

@ThomThomson
Copy link
Contributor

I think that we could potentially use only that issue. If we implement ORs after or during the unification of Controls and unified search, we could architect #127247 as a control type, rather than having two separate user experiences.

@stratoula
Copy link
Contributor

Sounds fair, we can close this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Input Control Input controls visualization Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas triage_needed
Projects
None yet
Development

No branches or pull requests

7 participants