[moved from <#C5T9GPWFL|>, original post by <@U01S...
# present-company
i
[moved from #C5T9GPWFL, original post by @fcd] I'm looking for a filtering GUI like Amazon's but more powerful like "(price < 1000) OR (price > 1000 & OS='macOS')". Is there something like that?
g
the search term you probably want is
parametric
f
Tried searching for parametric query gui I'm not seeing anything that looks like a point-and-click
Basically I want a checkbox/slider gui that compiles to sql or datalog or whatever
k
Like this?

https://www.youtube.com/watch?v=y9i4oW9dHHw&amp;t=5s

Notice that it shows the equivalent SQL query in the bottom left.
f
Yeah that looks pretty doable. Thanks.
e
I thought amazon like search UIs were called "faceted". The thing that is different on your ask is the "OR" part I think, since these UIs usually AND the different search patterns. Perhaps you'd need to duplicate the facets to be able to OR different criteria together
k
In the Olympic demo above, the various choicebox clauses are AND-ed together, but in the search field you have a more complex query language where you can also OR and NOT expressions. The query language is defined here: https://github.com/foam-framework/foam/wiki/MQL---Query-Language
e
right although I suspect Ivan is looking for a good way to express a query with arbitrary ands and ors with some GUI widget
w
Two thoughts maybe not the best ones but have been useful in the past... In a domain where nested AND and OR queries were common, we made ANDed conditions columns, ORed conditions rows. Alternatively, only allow a given query to use ANDs or ORs but make it so that you can name and reuse them.
g
most people don’t want this level of complexity in a single search. it can be done with multiple calls to search/filter • a^b^c^d^e • a^b^c^f^e • a^g^h
w
Having implemented some epic conditionals, I'm keen on tool support to make sure cases are covered.
k
We had a more complex GUI that supported OR-ing multiple AND-ed panels together, but it was too unwieldy and complex. Two things we did to address this is that usually when a user wants to OR, they want to OR multiple values for the same field, so we allow doing something like city=toronto,ottawa,"new york" which is the same as city=toronto OR city=ottawa OR city="new york". Also, we support a more complete query language in the text field, which supports AND/OR/NOT/()'s. As they perform searches with the GUI it shows them the equivalent query so they learn the query language, and then all they have to do is add OR's if they want to combine them. However, the OR in the query language was broken for many months at one time, and nobody complained, which leads me to believe that nobody uses that feature.
😱 1