I find it helpful to think of the desired behavior from the end user’s perspective. Typically, the end user will want to do one of the following in a given search…

  • Find items which contain all of the selected tags
  • Find items which contain any of the selected tags

(A single selected tag would return the same result for either.)

If I understand correctly, the approaches described in this thread thus far seem to address the latter scenario. @NigelG’s approach does it client-side, whereas @lottemint.md’s approach does it server-side (at least I think that’s the intent - I’m awaiting clarification).

The above was incorrect. In fact, @NigelG’s client-side approach addresses the latter scenario (show items which contain any of the selected tags), whereas @lottemint.md’s server-side approach addresses the first scenario (show items which contain all of the selected tags).

It would be really nice if there was a simple way to accommodate each of the above scenarios server-side. Why can’t it be as simple as contains all of list and contains any of list operators?

-Steve

3 Likes