Getting matched tag back


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 user_1.
When user 2 searches, it matches with tag public.
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?

Thank you.

Hi @satoko,

Unfortunately it’s not possible to return the matched filters. You can get the ranking information by setting the getRankingInfo to true at query time, but it doesn’t contain the matched filters values.