Chris’s SharePoint Reflections

Just another WordPress.com weblog




  • Chris Zhong

    IT consultant Australia








Search Query TotalRowsExactMinimum property

Posted by chrissyz on February 13, 2009

When we are coding against MOSS Search API, we use totalRows property to get the total search results from the search engine. However, why sometimes we found the totalRows number returned is not accurate. Why did that happen? And how could we fix that?

The reason for that is totalRows only give you an estimate result. It is very expensive to get a specific number due to the security trimming and search algorithms logic in SharePoint search. The trick is this property ‘TotalRowsExactMinimum’. It instructs the SharePoint search engine as to how accurate the TotalRows should be. It tells SharePoint the number of minimum hits that must be included in the result. The default value of it is 50. It is used in conjunction with totalRows. If you have more than 50 search results and you use TotalRows property with no modification of TotalRowsExactMinimum property, it will stop displaying further pages in the search results even though there are more records. Once you set the ‘TotalRowsExactMinimum’ more than the total results you estimated to return, Search engine will return the accurate total number. However, the higher you set ‘TotalRowsExactMinimum’, the more negative impact you will have on performance. Here is a very good blog gives you details explanation of how ‘TotalRowsExactMinimum” works.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: