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

OR properties filtering #5035

Closed
liyiy opened this issue Jul 7, 2021 · 7 comments
Closed

OR properties filtering #5035

liyiy opened this issue Jul 7, 2021 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@liyiy
Copy link
Contributor

liyiy commented Jul 7, 2021

Is your feature request related to a problem?

Please describe.

Currently our properties filters only allows for ANDs (if I want to add multiple properties they keep stacking on top of each other)

Describe the solution you'd like

Allow for ORs (adding multiple properties doesn't stack on top of each other)

Describe alternatives you've considered

Additional context

This came out of work for #4819, specifically for persons modal searching. On clickhouse we are able to re-use the properties param to "search" for a user BUT we're unable to do a search for a user's name OR a user's distinct_id, we can only pick one.

Example: I want to search for users who have either "xyz" in their names or their distinct_ids

Thank you for your feature request – we love each and every one!

@clarkus
Copy link
Contributor

clarkus commented Jul 28, 2021

I put some thought into this recently when working on query building. This is in the context of funnels, but could apply to any filtering scenario. We can include a global control for the set of funnel declarations: match any or match all - this would save us from having to repeat logical operators between steps while still satisfying the main request.

Screen Shot 2021-07-28 at 11 04 35 AM

@paolodamico
Copy link
Contributor

I’m a bit concerned that the “Match” is not clear enough standalone. Match all does communicate well that you’re ANDing all conditions, but match seems ambiguous. Perhaps an option would be to add a tooltip with extra context, but I do feel the “OR” tags are even clearer. What are we trying to accomplish here?

@clarkus
Copy link
Contributor

clarkus commented Jul 30, 2021

Match all === implicit AND between filter rules. Match any === implicit OR between filter rules. Unless we plan on supporting logical operators in each rule, this would let us set a mode for the set and save repeating and / or in every row.

@paolodamico
Copy link
Contributor

I don't think we plan to support dynamic filtering soon but I think it may be useful to repeat them. Or how about "match any" instead of just "match"

@clarkus
Copy link
Contributor

clarkus commented Jul 30, 2021

@paolodamico I don't think I'm understanding the question. The goal I'm trying to accomplish is setting a logical operator mode for the set of filters in a single prominent place. Where else would a user change this setting if not in some centralized position? If they're changing it for each declaration, that might be confused with dynamic operators between filters.

Is this more specific to picking values? Are we wanting to enable "or-ing" for a set of values within a single filter declaration? Maybe some real examples would help me understand the cases we're solving for?

@paolodamico
Copy link
Contributor

Okay sorry I didn't clarify well. I'm 100% aligned with the position of the filter (I was only suggesting using "Match any" instead of plain "Match"). In any case the point I was trying to make was to keep the "OR" labels (static labels like we have in cohorts, feature flags, ...) after each filter line, but that might not be needed.

@clarkus
Copy link
Contributor

clarkus commented Jul 30, 2021

OK I was confused, too, but I think we're aligned now. I have the control using match any / match all. I don't know if we need to repeat the operators, but it doesn't seem like it does any harm so we could try it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants