Can anyone point me to an algorithm, pref. vbscript, for sorting an array containing data such as follows ('|' represents the delimiter for the array's dimensions):
Mary | April | 1983
Fred | June | 1982
Peter | January | 1978
Jude | December | 1992
Paul | April | 1991
...so that if I want to sort the results by the search term 'apr', Mary's would score the highest and if I sorted by 'apr' and '198' that Mary would rank higher than Paul.
As hopefully you can see I want to enable users to search by multiple search terms and then to rank the results by those terms. I guess I need to score each array element by each search term?
Mary | April | 1983
Fred | June | 1982
Peter | January | 1978
Jude | December | 1992
Paul | April | 1991
...so that if I want to sort the results by the search term 'apr', Mary's would score the highest and if I sorted by 'apr' and '198' that Mary would rank higher than Paul.
As hopefully you can see I want to enable users to search by multiple search terms and then to rank the results by those terms. I guess I need to score each array element by each search term?