Prismic Predicate for all custom types

Hey Guys, I hope this message finds you well.

I'm building a search feature on one of my websites and I would like to fetch all documents but add a filter for custom types.


I have 7 custom types on my Prismic.
I want to search something in every custom type unless those with 'meta_robots' equal 'noindex,nofollow'.

I can build filters for every document with prismic primary fields (type, tags, etc).'document.type', '<any type>')

But I can't do something like:

Prismic.Predicates.not('<customtypes>.robots', "my value'')

Can anyone help me with this trouble?


1 Like

Hello @telco.pls

Thanks for reaching out to us.

You can use fulltext for checks if a string is found inside a whole document or within a specific field on a document.

// all page documents with a description that contains the words "configuration" and "endpoint."
[fulltext(,"configuration endpoint")]

I don't understand this part "unless those with 'meta_robots' equal 'noindex,nofollow.'". Could you explain it more?