[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 415
  • Last Modified:

Windows search ranking not return documents in expected order

Hi All,

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  

Open in new window


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?
0
rito1
Asked:
rito1
  • 2
1 Solution
 
SunBowCommented:
You are selecting by rank and sorting by rank:
    - order by System.Search.Rank
You likely would fare better ordering by 'word count'
0
 
rito1Author Commented:
Thanks SunBow this does sound a better option in our case... Would you know the SQL syntax for order by word count?
0
 
Big MontySenior Web Developer / CEO of ExchangeTree.org Commented:
you'd have to look in the SystemIndex table to see if there is any WordCount column. Remember, there is more to the Ranking than just a word count, there is how many times those words appear and how close together they appear, as well as many other factors.

you may want to have a look here for more info:

http://technet.microsoft.com/en-us/library/ff404224.aspx
0
 
SunBowCommented:
:(
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now