in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

Sander's Blog

MOSS Search: TotalAvailable & TotalRows not accurate

A query against MOSS search engine returns a specified number of results and a indication of the total number of results. When working with the API this is the TotalRows property of the ResultsTable, working with the WebService this is the TotalAvailable element of the ResponsePacket.

If you, like me, want to base your paging on the TotalRows or TotalAvailable properties and you expect it to return the exact number of results you're in for some strange behaviour...

I do not have a nice solution yet, although the API also exposes the IsTotalRowsExact property. This will tell you when you're on the save side. The webservice ResponsePacket has not got an equalivant property.

The MSDN documentation of the API does not mention this number not being exact: http://msdn2.microsoft.com/en-us/library/microsoft.office.server.search.query.resulttable_members.aspx

The webservice documentation actually does mention it: http://msdn2.microsoft.com/en-us/library/aa193748(office.11).aspx#RangeType_TotalAvailable

"The total number available. This number may not be 100% accurate and all these results may not be accessible."

The number will become more accurate once you move to the end of the resultset.

Be warned...

Published Jan 21 2008, 07:35 AM by Sander de Koning
Filed under:

Comments

 

SharePoint Link Love: 01-27-2008 part six at Virtual Generations said:

Pingback from  SharePoint Link Love: 01-27-2008 part six at  Virtual Generations

January 27, 2008 8:13 AM
 

SharePoint Link Love: 01-27-2008 part four at Virtual Generations said:

Pingback from  SharePoint Link Love: 01-27-2008 part four at  Virtual Generations

January 27, 2008 8:22 AM
 

Zelota said:

Solution:

queryResults.Tables[0].ExtendedProperties["TotalRows"]

August 27, 2008 7:01 AM

Leave a Comment

(required )  
(optional )
(required )  
Add

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts