Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a KQL query used with KeywordQuery that used to work in SP 2010 but no longer works in 2013:

scope="All Sites" AND path:"/sites/" AND path:"/Pages/ThisPage.aspx"

The error that’s given is:

ArgumentOutOfRangeException:
The allowed range of values is 0 to 500    Parameter name: RowLimit
  at Microsoft.Office.Server.Search.Query.QueryProperties.ValidateRowLimit(Int32 value)
  at Microsoft.Office.Server.Search.Query.QueryProperties.set_RowLimit(Int32 value)

I need to set RowLimit to 1000, but I don’t know why there is a limit of 500. Decompiling the code for Microsoft.Office.Server.Search.Query.QueryProperties, RowLimit is compared against a property called MaxRowLimit which defaults to 10000, so I suppose that value is being set by some other means (I'm not modifying the value from the default)

My decompiler suggests that MaxRowLimit is set in a few ways:

  • this.MaxRowLimit = cachedSearchServiceApplicationInfo.MaxRowLimit;
  • this.MaxRowLimit = cachedSearchServiceApplicationInfo.DiscoveryMaxRowLimit;
  • By setting the Query property
  • During internal cloning

I've checked the service application but can't see a way to set a max row limit for that application.

Is this a search service application configuration issue?

Update: I followed this blog post to check the Max setting using powershell and the result was 10000:

PS> $ssa = Get-SPEnterpriseSearchServiceApplication
PS> $ssa.GetSetting('Config:qp_MaxResultsReturned')
10000
share|improve this question

1 Answer 1

up vote 1 down vote accepted

Decompiling the SearchServiceApplication we see that MaxRowLimit on that application defaults to 500 and that value is passed to the query.

The SearchServiceApplication MaxRowLimit can be modified as follows:

PS> $ssa = Get-SPEnterpriseSearchServiceApplication
PS> $ssa.MaxRowLimit = 1000
PS> $ssa.Update()
PS> iisreset
share|improve this answer
    
So did this work for you? –  Andrey Markeev Aug 17 '13 at 13:25
    
Yes it solved the problem –  Daniel Aug 19 '13 at 22:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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