I have the following authenticated query with a token from logging in a user.
authClient(token).query( q.Get(q.Match(q.Index("item_number_reversed_owner"))) );
I have the following corresponding index (that is reversed)
It matches the following docs and looks like this in the dashboard
I have tried the following predicate function, but It gives me a permissions error. It is referencing the terms, but am not sure how to select data.owner from the terms such that the user is returned and matches the Identity() in the function so that it returns true and allows me to only read the docs of the authed user with this Index.
("terms", Equals(Var("terms"), [Identity()]))
Hope someone can help with this. Thanks ahead of time
Update: I have tried the following but it doesnt event return the ref to the current user not sure why it should.
const test = await authClient(token).query( q.Get(q.Match(q.Index("item_number_reversed_owner"), q.CurrentIdentity())) );
Heres the raw request