I am using MOSS 2007 to provide a custom search results page.

I need to display a number as part of search results which indicates the number that result appears in the whole result set.

The problem is that the XML returned by search does not contain data pertaining to the page (of results) that you are on.

I can use the value of 'id' but this only works if I do not use paged results (not ideal) because the id of the first result on the next page will revert to 1 again.

Has anyone had to address this before? Any XSLT magic I can use? Is there an additional field I can add into the search results to enable this?


Its been a while since i looked at this, but isnt that what the ID element in the returned XML is there for?

    <title>Microsoft.SharePoint Namespace</title> 
    <author /> 

Check the reference here:


  • Is that what the "Rank" value is for? I cannot seem to find a schema definition so I cannot validate. – Mike Oryszak Jul 17 '10 at 21:37
  • Anders, the id element will give you the number in the current page of results. Move to page 2 and the first item is id 1 again. Useful isn't it! – Charles Lee Jul 20 '10 at 7:39
  • ahh yeah i thought there was something fishy. You do have the page count though in query string (start1 in WSS), so you could use the two combined to get an id i guess. – Anders Rask Jul 20 '10 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.