Max Number of Records not being set on layers

860
6
12-11-2012 07:14 AM
DavidAnderson
New Contributor II
I created a test map service with the default settings of returning 1000 records with Max Number of Records.  One of the layers has about 5000 features that I want to return for a query.  After changing the Max Number of Records to 10000 in the Server Manager for the service (and restarting the service), the layers still show the original 1000 and will not return more than 1000 records.
Just to make sure my test javascript was working I created a new service with the value set to 10000 and it works properly.

Is there some trick to getting the service parameter to be passed on to the layers within the service?

Thanks,
David
Tags (2)
0 Kudos
6 Replies
JonathanQuinn
Esri Notable Contributor
What version are you using?  It should work by just editing that value in Server Manager or ArcCatalog.
0 Kudos
DavidAnderson
New Contributor II
I am using 10.1.  I thought it should work that way too but it is not.  I see MaxRecordCount of 10000 when I go to the REST service directory for the main service but when I look at the layer in question it shows 1000.  Running the query from the REST page only returns 1000 records as well.

Thanks,
David
0 Kudos
DavidAnderson
New Contributor II
After a little more digging, I found that other layers within the service where returning more than 1000 records.  The original query for the layer in question had a WHERE clause of "Shape_Area > 0" which should have returned all of the records but only returns 1000.  Changing the WHERE clause to "1 = 1" returns all of the records as expected.  I guess I have a way to get the query to work, now.

Thanks,
David
0 Kudos
JonathanQuinn
Esri Notable Contributor
So a query that querys for everything using a field, (rather than the 1=1 query), doesn't return more than 1000 values?  Are you on SP1 or Final?  I'll try this on my side.
0 Kudos
DavidAnderson
New Contributor II
After your reply, I did a little more testing.  Using a where clause on any other field on that layer works fine, e.g., "PIDN <> ''".  Also changing the where clause to "Shape_Area > 0" returns all 5137 records.  Using "Shape_Area>0" (no spaces) returns only 1000.  Does the server cache queries?  I ran the query with no spaces in the where clause before changing the MaxRecordCount to 10000.

The server version is 10.1.0 (build 3035).  Not sure if that is SP1 or not.

Thanks,
David
0 Kudos
JonathanQuinn
Esri Notable Contributor
I cannot reproduce this at 10.1 SP1, (you can check the Home site of your Rest endpoint, it'll probably say 10.1, 10.1 SP1 will say 10.11).  The Service Pack for ArcGIS Server 10.1 can be downloaded and installed from the Customer Care Portal.  The Service Pack is essentially the whole application, so it may take some time to download and install.
0 Kudos