Is there any way to construct a filter that will filter out any documents
that match any values in an array from, say, 2 different fields?

Imagine a document that stores friendships/recommendations/etc, where the
document might store ids for each user as user_1 and user_2, and then other
information in whatever other fields you'd need. The important thing is
the user_1 and user_2 fields, but here's an idea of what the doc might look
like:

I would like to execute a query that returns a set of documents but
excludes any friendships for a list of user ids. These excluded user_ids
might be listed as user_1 in some docs, but might be listed as user_2 in
others. I can easily construct a terms query for each field that will say
"exclude where user_1 is any of these values AND THEN exclude where user_2
is any of these values" but what I'd like to do is say "exclude where
either user_1 or user_2 are any of these values".

Some of these filters end up getting pretty large, and I'd like to be able
to avoid duplicating the array within the same query if I can. Something
like this would be awesome, but I can't figure out if there's any way to do
it: