Things hard and not so hard.... RSS 2.0
# Friday, September 21, 2007

I had a little time this week and thought I'd write a quick stsadm extension to enumerate and set index ranking parameters, when querying MOSS indexes.

My main motivation was so you could change the ranking order of XLS files over PPT files etc.

There seems to be a ancient art in setting these values.

So what's included:

1. an XML file that needs to be copied to the \12\Config folder. Tells stsadm about the new commands and what class to run.

image


2. A .NET assembly that needs to be GAC-ed so the stsadm doesn't have to look too hard to try and find the class.

Creating an extension is a pretty easy thing - extend an interface as follows:
image

 

The next part was to interface with the indexing service as follows:

image

The keyValues collection are created by stsadm and passed into your method - how good is that.smile_regular

To get access to the Ranking and SearchContext classes a few additional references are required. Such as:

- Microsoft.Office.Server
- Microsoft.Office.Server.Search
- Microsoft.Sharepoint.Search

These are all in the attached project.


Running the enumindexrankparams looks a little like this:
(these are some secret numbers to do with weightings of 'click depth', 'url depth', language etc. A value of 0 is ignored. I'm still working through what these exactly are - apart from the file type ones)

As I understand you can't add additional weightings here for file types like PDF etc.

image

the commands to run this are:

1. stsadm -o enumindexrankparams -site <url to ssp>

2. stsadm -o setindexrankparams -site <url to ssp> -<rank name> <rank value>
    stsadm -o setindexrankparams -site <url to ssp> -filetypepriorlistitems 1


Have fun - the project shows you how to extend the stsadm and also start to get a bit of a feel of the Search/Index APIs.

Grab the source here -

Friday, September 21, 2007 3:00:59 AM (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0] -
MOSS | Office
Archive
<September 2007>
SunMonTueWedThuFriSat
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456
Blogroll
 AppFabric CAT
AppFabric Windows Server Customer Advisory Team - New Blog.
[Feed] BizTalk 2006 - Windows SharePoint Services adapter
BizTalk 2006 Sharepoint adapter!!
 Breeze SharePoint 2010 Bootcamp
Breeze SharePoint 2010 Bootcamp
[Feed] BTS 2006 R2/EDI
[Feed] Chris Vidotto (MS BTS Legend)
Needs no intro....
[Feed] Clayton James
Special Rants and a great perspective on all things....
 Mark Daunt
BTS/SPS/.NET GURU!!!
[Feed] Rahul Garg
National MS BizTalk TS - guru and great guy
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2012
Breeze
Sign In
Statistics
Total Posts: 517
This Year: 10
This Month: 2
This Week: 0
Comments: 259
All Content © 2012, Breeze