Can't get trigram search _sorting_ to work to save my life
Struggling to get fragments to work properly.
I've tried various variants of read actions, query builders etc.
What I'm trying to do is use pg_trgm's similarity function to 1. filter by similarity > 0.2 (that works) and then order by similarity (this doesn't work).
What I have right now is this:
The resulting SQL
You can see
I've tried various variants of read actions, query builders etc.
What I'm trying to do is use pg_trgm's similarity function to 1. filter by similarity > 0.2 (that works) and then order by similarity (this doesn't work).
What I have right now is this:
The resulting SQL
You can see
similarity(t0."name"::text, NULL) ends up being NULL. I tried moving this into query builder expressions but the fields aren't recognized. I tried inlining the the expression into the action, also nothing. I'm really lost right now. What's the right way to do this? Thank you.
Ash