Tuesday, April 29, 2008

MOSS Search feature: definition extraction

Recently I discovered an interesting new feature within MOSS Search (Apparently this guy had the same experience - What people are saying - definition extraction) Take a look at the last search result in the next screenshot ...


So how does this work - I only found a couple of online references. But the most complete one was listed in the MSDN forums - Discovered definitions/What people are saying about ...

The Definition Extraction feature finds definitions for candidate terms and identifies acronyms and their expansions by examining the grammatical structure of sentences that have been indexed (for example, NASA, radar, modem, and so on). It is only available for English. Definition extraction feature in MOSS 2007 is a feature that extracts mening of definition from indexed text. User enters a search query “X”, search  returns from the document index a ranked list of sentences containing definitions of “X”, such as “X is Y” with links to the documents in which the definitions were found. In MOSS, implementation definitions are extracted from free text rather than from glossaries.

Definition Extraction feature is integrated with Search Feature at Crawl/Indexing and Query times. During the crawl, tokens with alternate definitions are added to search database . At query time passed search token is compared with existing entry in definitions database. If a match is found the definitions link is populated at the bottom of the search results page. Collapsing the link shows number of definitions.

It’s a default setting and cannot be customized. You can turn off Definition Extraction by Editing the Search Centre results page in question, Modifying the Search Core Results web part, and turning off ‘Display Discovered Definition’.

Unfortunately, the white paper about Plan for building multilingual solutions seems to confirm the fact that definition extraction only seems to work for English.

Monday, April 28, 2008

Realdolmen blog ...

First time that I see this http://realdolmen.wordpress.com/ ... this is actually the new company I will be working for after www.dolmen.be and www.realsoftware.be are merged ...

Tags van Technorati: ,,,

Thursday, April 24, 2008

What is net stop sens all about?

I blogged about this before - if you have issues with some Office client-MOSS integration  within a VPC you should try net stop sens. But what does it do behind the scenes?

Apparently it stops the System Event Notification service which is tracks system events such as Windows logon, network, and power events.  It will also notify COM+ Event System subscribers of these events (such as a lot of client apps) in a real world distributed environment. Off course when you are not on a network it is kind of useless and more of hassle as you may have noticed.

Sunday, April 20, 2008

Interesting reads and resources about SharePoint, intranets, portal steering committees, etc ...

Tuesday, April 15, 2008

Arrived at MVP Summit and MOSS Analytics Extensions featured on The System Spotlight episode 5

After an unforeseen stay in Amsterdam (the flight was overbooked), I finally arrived in Seattle for the MVP Summit...unfortunately one day later then expected.

On another note - Michael Ganotti talks about my previous blogpost - Extending Usage Analysis Reporting in MOSS 2007 in his The System Spotlight Episode 5 (Thanks, Michael). Don't forget to check out the code at http://www.codeplex.com/sharepointextensions

Sunday, April 13, 2008

Extending Usage Analysis Reporting in MOSS 2007

You probably have seen the nicely looking Usage Analysis pages in MOSS which display different types of info using Reporting Services reports.

If you want to explore how these are implemented you might want to take a look at these two PDFs of ASP.NET Pro articles which were written by Matt Ranlett and Brendon Schwartz (For more info  about them check out their blogs at Atlanta .NET Regular Guys):

  • Part I: explains about the fundamentals about the Search Usage Analysis reporting (see p. 6 to 14)
  • Part II: shows how to implement a custom control to display top search terms. (see p. 38 to 43)

I started with the info in these articles and took it a little bit further.

There are a number of application pages (pages which you find in the _layouts directory) which show usage analysis data - for this example I will only focus on the one you find in the SSP about search queries, SPUsageSspSearchQueries.aspx .

You will probably notice that these pages implement classes which are found in the Microsoft.SharePoint.Portal.Analytics.UI namespace (The SDK states that the classes in the Microsoft.SharePoint.Portal.Analytics namespace are intended for internal use only, ... nothing found about the UI subnamespace though).

Let's take a look at the server controls on the Search Queries page (at SSP level):

  • QueriesByDayReportControl: queries over previous 30 days
  • QueriesByMonthReportControl: queries over previous 12 months
  • TopSiteCollectionsReportControl: top query origin site collections over previous 30 days
  • QueriesByScopeReportControl: queries per scope over previous 30 days
  • SspTopQueriesReportControl: top queries over previous 30 days

When you take a look at the code for the SspTopQueriesReportControl in the Microsoft.SharePoint.Portal.dll with Reflector, you will notice that it inherits from TopQueriesReportControl which in itself inherits from QueryTopLargeListReportControl. The QueryTopLargeListReportControl uses an RDLC file (compact Reporting Services report definition file - take a look at converting RDL and RDLC files) and the data is retrieved using a stored procedure, proc_MSS_QLog_TopQueries.

It is possible to build a component which derives from QueryTopLargeListReportControl and use this component to expose the data which is retrieved from the database - you will need to follow these steps to do this:

  • Create a new custom class which inherits from QueryTopLargeListReportControl
namespace SharePoint.Extensions.MOSSAnalytics
public class GetTopQueries : QueryTopLargeListReportControl


  • You need to implement the two properties RdlFileName (you can leave this blank) and StoredProcedureName.

protected override string RdlFileName
get { throw new NotImplementedException(); }

protected override string StoredProcedureName
get { return "proc_MSS_QLog_TopQueries"; }

  • Add 2 additional properties which are used by the control TitleText and StoredProcedureParameters. You can override some of the parameters in your own class such as the TopResultsCount which is default set to 300.

protected override string TitleText
get {return "GetTopQueriesControl";}

protected override Collection<SqlParameter> StoredProcedureParameters
Collection<SqlParameter> storedProcedureParameters = new Collection<SqlParameter>();
Guid guid = SPControl.GetContextSite(this.Context).ID;
storedProcedureParameters.Add(new SqlParameter("@siteGuid", guid));
storedProcedureParameters.Add(new SqlParameter("@isSspLevel", this.IsSspLevel));
storedProcedureParameters.Add(new SqlParameter("@topResultsCount", this.TopResultsCount));
return storedProcedureParameters;

  • Create a new method GetData which calls into the inherited method LoadReportData which returns a Datatable.

Now your custom component is created and ready to be used in your own webparts. The full source code is available on Codeplex in my newly created SharePoint Extensions project - http://www.codeplex.com/sharepointextensions . The project is created using Visual Studio 2008 and the structure is structured in such a fashion so that you can use WSPBuilder to build a SharePoint Solution file.

Wednesday, April 09, 2008

SharePoint Workflow History Cleanup jobs ...

When I first saw this post - Huge MOSS workflow issue ... What is Microsoft thinking!!! - I was shocked. But fortunately the soup is not eaten as hot as it's cooked ...

There is indeed a timer job  (Check SharePoint Central Admin > Operations > Timer Job Definitions) which removes the link between the item on which a workflow has run and the entries in the workflow history list. This means that the info in a workflow history list will not be complete anymore after a certain period of time (default 60 days).

Luckily Robert Bogue gave some more background information in SPWorkflowAssociation.AutoCleanupdays as well as some workarounds:

  • Purging of this list is done using a SharePoint timer job - if you build your own custom workflows you can change the setting by modifying workflow.xml in the features folder like this








  • You can modify this setting using the SharePoint object model - as Robert's postings suggest take a look at the SPWorkflowAssociation.AutoCleanupdays property. Take a look at the next code sample
  • using (SPSite sitecollection = new SPSite("http://moss:99"))
    using(SPWeb site = sitecollection.OpenWeb("/demo")){
    SPWorkflowAssociation _assoc = null;
    SPList list = site.Lists["Shared documents"];
    foreach (SPWorkflowAssociation assoc in list.WorkflowAssociations)
    if (assoc.Name == "WFDemo")
    _assoc = assoc;
    _assoc.AutoCleanupDays = 2;


Monday, April 07, 2008

Integrate SharePoint Search into Office clients using the Research task pane

This is something which I used to demo a lot when doing SharePoint Portal Server 2003 search demos (with Office 2003) and it still works with SharePoint 2007.

Starting from Office 2003 you have a research task pane in Office which allows you to search for information in a number of references (See How to Research Office training section) such as an English thesaurues, Encarta, etc ...

You can however easily integrate SharePoint search into this same research task pane. Just click Research Options > Add Services and next add a the URL to the search webservice of your SharePoint Server ... this will look something like this http://[servername]/_vti_bin/search.asmx.

The only thing which is a little different in Office 2007 is how you can access the research task pane:

  • Word 2007, Excel 2007 and Powerpoint 2007:  take a look at the Review tab - here you will see the Research option
  • Outlook 2007: when composing a mail message - right click and select Look up - this will also open the Research Task Pane

Saturday, April 05, 2008

Changing the default maximum size of SharePoint WSP files

If you are not using the SharePoint WSP builder tool and you are building your WSP's using makecab.exe then this is something usefull to know. By default the size of the wsp will be limited to 360 KB (which is the max. size of 5.25'' floppies from the good old days). You can however change this by adding the following to your .ddf file:

.Set MaxCabinetSize=0

.Set FolderSizeThreshold=0
.Set CabinetFileCountThreshold=0
.Set FolderFileCountThreshold=0

Friday, April 04, 2008

[OT] Mountainbike video from les 2 Alpes

This is something you need to see - a recording from a downhill mountainbike on the famous track Venosc in les 2 alpes ....