?
Solved

Windows search ranking not return documents in expected order

Posted on 2014-12-09
4
Medium Priority
?
389 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 33

Accepted Solution

by:
Big Monty earned 2000 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

Percona Live Europe 2017 | Sep 25 - 27, 2017

The Percona Live Open Source Database Conference Europe 2017 is the premier event for the diverse and active European open source database community, as well as businesses that develop and use open source database software.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Assume you have an outside contractor who comes in seasonally or once a week to do some work in your office, but you only want to give him access to the programs and files he needs and keep all other documents and programs private. Can you do this o…
A quick guide on how to use Group Policy to create a custom power plan and set it active on Windows 7.
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
Suggested Courses

801 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