1

I have 2 category groups (function and material).

In my search for i have the 2 category groups listed as checkboxes, so the user can perform multiple search combinations.

How I need the search to work is, if I selected Sales and Marketing from the functions categories list and selected Videos and eBooks from the materials categories list. I want to be able to see Video and eBooks entries in either Sales or Marketing.

What is the best way for me to handle this type of query.

  • Should I be using name="category[]" for both category groups, or should they be named differently to help handle this type of thing? – zizther Mar 31 '14 at 13:01
  • So this kind of search?: (Video AND eBooks) AND (Sales OR Marketing) – Solspace Apr 1 '14 at 2:35
  • @solspace that is correct. How best to do that with supersearch – zizther Apr 1 '14 at 7:38
1

I cannot comment about Super Search, but Low Search can handle this using the Categories filter and its group syntax. In your case, you could use name="category:functions[]" for the one group, and name="category:materials[]" for the other.

See also the second part of the Categories filter example here.

| improve this answer | |
  • Awesome, thanks Low. I think that is the type of thing i was after – zizther Mar 31 '14 at 13:09
  • does the search only work with category_id or can category_url_title be used? Also if i did the above, are multiple categories from each group matched in the search or will it only pull entries which are in that category. Just trying to make sure i get the above query working correct – zizther Mar 31 '14 at 22:12
  • category_id only, like the native category parameter. You can switch from any given category to all given categories using the require_all parameter LS provides. – Low Apr 1 '14 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.