Using contains with a list of items

Things I have tried

What I’m trying to do

I want to create a query that checks for a type tag from a list. For example, I have a “typer” frontmatter tag on all my documents. I want to create a query that retrieves al documents with either the type “meeting” or the type “datasheet”.

something like : contains(type, [“meeting”, “datasheet”])

I realize that I can chain the conaints clauses simiar to

WHERE (contains(type, “meeting”) OR contains(type, “datasheet”))

but in this case I have several other clauses and things get messy. I was hoping for a cleaner way if there is one.


You can use multiple WHERE clauses… The filtering is sequential, respecting the order, working like an AND:

WHERE contains(type, "meeting") OR contains(type, "datasheet")
WHERE field = "value"
WHERE contains(key, "value 2")

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.