I use full-text search to stretch strings.
I order rows based on the score (ORDER BY SCORE), and then from the top 20 rows (LIMIT 20), I want a rand (RAND) result.
So, for any particular search query, I want to randomly show 5 of the top 20 results.
My workaround is based on code where I put the top 20 in an array and then randomly select 5.
Is there a sql way for this?
Larry source
share