I created a query with a like and a or
select * from xxx where title like ('%bon%') or title like ('%test%')
I receive a result with : bonjour je test bonjour test bonjour test
And I would like ordered by number of word in title : bonjour je test test bonjour bonjour test
I use Grails with namedQueries.
Is it possible to do that ?
Thanks
You can use this little trick to count the number of space characters and sort by that.