Multiple custom-types data using a single query

Hi Team,

I had 4 custom types namely questions, topics, programs, lessons. I had 4-5(a,b,c,d,e) tags related to content corresponding to those types. Now I need to query content having tags a,b,c,d,e. It should hold 5 items for each custom type. Do we have a query to get results in this model?

Trying something like a query which filters data for
Prismic.Predicates.at(‘document.tags’, [‘a’, ‘b’, ‘c’, ‘d’,‘e’]) as well as
Prismic.Predicates.any(‘document.type’, [‘questions’, ‘topics’, ‘lessons’ , ‘programs’])

At the end I need 5questions + 5topics + 5lessons + 5programs for tag ‘a’ and so on

Hey Renee, welcome to the community forum!

I’ll guess that you’re using the Prismic’s default tagging system. If you are the suggested predicates that you showed would be the correct approach, that one allows you to get all the existing tags.

You could also try and implement a Custom Tagging System if you need to have more control over how these Custom types relate to each other. Then you’ll be able to query all the documents linked to any given custom tag.