marklogic-community/demo-cat

Negative facets

grtjn opened this issue · 2 comments

grtjn commented

Suggestion from the field: allow selecting 'anything without a domain', basically to check for completeness. This obviously applies to other facets as well.

Would be nice to completely negate an entire facet with one click, e.g. really have a button or link '(no domain)', perhaps even with a count. Alternatively, having the option to select for negated facet value individually. We have done something like that with other demos in the past:

Domain:
+ / - EMEA (nn)
+ / - Public Sector (mm)
etc

You can work around this with a search string, but that is cumbersome:

(-domain:EMEA AND -domain:"Public Sector" ...)

Would be great if we could make something generic out of this..

I'd like to see this generally available through ml-search-ng. Have you seen examples of negative facets handled with structured queries?

grtjn commented

Could be as simple as a different range query operator. But you should treat multiple values from same facet as AND..

I'm more worried about showing ths in a usable way.. ;-)