Solved

Windows search ranking not return documents in expected order

Posted on 2014-12-09
4
350 Views
Last Modified: 2014-12-19
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
Comment
Question by:rito1
  • 2
4 Comments
 
LVL 24

Expert Comment

by:SunBow
ID: 40488785
You are selecting by rank and sorting by rank:
    - order by System.Search.Rank
You likely would fare better ordering by 'word count'
0
 
LVL 1

Author Comment

by:rito1
ID: 40488810
Thanks SunBow this does sound a better option in our case... Would you know the SQL syntax for order by word count?
0
 
LVL 32

Accepted Solution

by:
Big Monty earned 500 total points
ID: 40489081
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
 
LVL 24

Expert Comment

by:SunBow
ID: 40509047
:(
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
This Micro Tutorial will teach you how to the overview of Microsoft Security Essentials. This is a free anti-virus software that guards your PC against viruses, spyware, worms, and other malicious software. This will be demonstrated using Windows…
This Micro Tutorial will go in depth within Systems and Security in Windows 7 and will go into detail regarding Action Center, Windows Firewall, System, etc. This will be demonstrated using Windows 7 operating system.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now