Configure web map for feature search

6258
4
02-13-2015 01:16 PM
TedChapin
Occasional Contributor III

If your web map configured for feature layer search using the search bar returns no results, even though the query works fine in a manual REST query, here's why:

New at 10.3 in the ArcGIS REST API:

- query now supports pagination in a query layer.

This allows you to page through query results instead of getting all the service limit results at once.  New query parameters resultRecordCount allows you to ask for how many results you want at a time and resultOffset allows you to ask for a new batch of results .  http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#/Query_Map_Service_Layer/02r3000000p1....  These were introduced at 10.3 because SQL Server (and other RDBMS too) introduced pagination at SQL Server 2012, in which select query results can be obtained in batches using "fetch-offset" T-SQL statements.  If you try to query a layer with data from a RDBMS that does not support pagination (SQL Server 2008 does not), you will get an error that pagination is not supported.  If you are writing your own custom REST client you can find out if a layer supports pagination before you decide to use these parameters.  Go to the layer's REST page and in the "Advanced Query Capabilities" is a property called "Supports Pagination".  In the December update for ArcGIS Online, the "feature search" was updated to use pagination in its query (confirmed with Fiddler) with a default resultRecordCount = 5.  Therefore, if your data layer does not support pagination the search won't work.  Of course, the documentation to configure feature search in a web map (http://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm) does not mention pagination or the resultRecordCount.

Also, the feature search annoyingly supports only text fields.

4 Replies
AlanRex1
Esri Contributor

Great post Ted!  Very helpful.  I just wanted to add a few notes from my experience.

1) In a web map in ArcGIS Online, when feature searching a 10.3 map service that does not support pagination the error message returned is "Error: Location '[your search value]' could not be found".  I only mention this in hopes that other users Googling this error will be routed here.

2) I've had trouble finding documentation on exactly which databases support pagination.  As of press time, this was the most comprehensive list I could conjure up (through testing and research):


Does not support pagination:
Microsoft SQL Server 2008
Oracle 11g

Does support pagination:

Microsoft SQL Server 2012

Microsoft SQL Server 2012 Express
Microsoft SQL Server 2014
Microsoft SQL Server 2014 Express

Oracle 12c
PostgreSQL 9.2

PostgreSQL 9.3

I've personally tested most of these but not all.  If I got anything wrong, please feel free to chime in. 

BillFox
MVP Frequent Contributor

Related ESRI Support Article:

Error: Pagination is not supported 

ChristoforosKatsaounis
Esri Contributor

Just wanted to add a few notes based on my experience with this issue ("Error: Location '[your search value]' could not be found") in both ArcGIS Online and Portal.


This came down to being an issue in both ArcGIS Online and Portal when running the feature layer search. The search would submit a request with parameters that required pagination to be set to True, even though this should not be really a requirement. This has been fixed with the latest ArcGIS Online releases and is also listed as a fixed issue in the upcoming Portal 10.4 release.

Please let us if this or another issue occurs again for this functionality.

0 Kudos
JenniferBorlick
Occasional Contributor III

I'm really digging trying to find a solution to an issue that I'm having.

I cannot enable "search suggestions" in any of the apps (both Template and Web AppBuilder) that I'm creating. The Web AppBuilder at least tells me that my data layer does not support pagination. I'm running SQL Server pre- 2008 database. Is this what is causing the issue? Can I stop searching until after our server is upgraded? Is this one more thing I can add to the list to IT in getting the server upgrade moved up in the priority list?

0 Kudos