I am looking for a way to know which tags matched the filter.
for context, we are using tags to control access to records. Our records can be private or public.
for example, a record has tags
['user_1', 'user_3', 'public']
A search filter for a given user is
'user_<id>' OR 'public'
When user 1 searches, it matches with tag
When user 2 searches, it matches with tag
We are not returning tags for security concerns. So you can’t check how a record matched the filter on the client-side.
Is there a way to only return matched tags? If not, is there another way for clients to know how the record was matched?