I believe Match() function returns ref which can used to perform other operations.
Document is fetched correctly for q.Get(q.Match(q.Index("index_abc"), q.Casefold("xyz")))
But when trying to Update or Delete, with ref from Match(), an error “invalid arguments is thrown”.
q.Update( q.Match(q.Index("index_abc"), "xyz"), { data: { updated_at: Date.now() } } )
So, I’m doing this and it works correctly:
q.Update( q.Select('ref', q.Get(q.Match(q.Index(''inex_abc"), "xyz")), { data: { updated_at: Date.now() }, } )
Am I missing something?
Thank you.