Sorting a FileList by keyword relevance

Permalink
Hi all

I've built a resources page which searches through a FileList -- it works well, sorting the results of a keyword search by date and A-Z (I've put the full text of each file into a file attribute).

However, I'd like to sort the results by relevance instead (number of matches in the full text). I notice the PageList model has a sortByRelevance() method, but the FileList doesn't -- the former relies on sorting cIndexedSearch, but as far as I can see the FileList doesn't use/create this field.

Has anyone managed to achieve this? Any help would be much appreciated :)

39steps