Lots of for-each-in-list could probably do it. Compare each title text with the search text, and assign the index a score (in a list variable maybe) so that you have an idea of which titles match the most. Then, go through the list variable to rearrange your data.