2

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?

1 Answer 1

1

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

<All_Results>
  <Result>
    <id>1</id> 
    <rank>713</rank> 
    <title>Microsoft.SharePoint Namespace</title> 
    <author /> 
    <size>39058</size> 
    ...

Check the reference here:

http://msdn.microsoft.com/en-us/library/ms584121(office.12).aspx

3
  • Is that what the "Rank" value is for? I cannot seem to find a schema definition so I cannot validate. Jul 17, 2010 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! Jul 20, 2010 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. Jul 20, 2010 at 17:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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