I am working with classic ASP and the Windows search using the server object Search.CollatorDSO.
My SQL query is as follows, which seems to work without issues other than the order in which it is returning the document results are not in an order I would have expected. This may be down to my limited understanding of the ranking algorithm being used...
SELECT top 1000 System.FileName, System.Search.Rank FROM SystemIndex WHERE scope='file:C:\inetpub\wwwroot\www\Search' AND NOT scope='file:C:\inetpub\wwwroot\www\Search\ex' and FREETEXT('phrase') order by System.Search.Rank desc
What is happening at the moment is that some documents are showing rank of 999, although the word count (when checked in adobe pdf reader) is showing documents are incorrectly ordered, ie the top rated document with rank 999 could have 50 instances of a word, yet a document with the same rank has 100 instances of that same word. But is placed lower in the results. I would have expected the results with the most word count be placed higher?
Could anyone provide insight into why this could occur?