PROBLEM

The ArcGIS Online Map Viewer search tool returns incorrect results when searching from a string field

Last Published: July 17, 2020

Description

The search tool in ArcGIS Online Map Viewer can be configured to allow search from specific layers and fields so it is simpler to locate features in a map. When the search tool is configured to search from a string field, entering a keyword in the search box returns incorrect results and does not honor the search settings for the field (equals or contains). The image below shows the search tool settings configured to display results from a string field (StringSearch) that must be equal to the search terms.

Image showing the search tool settings.

The image below shows the incorrect results when entering '15' as the keyword in the search box.

Image showing the search tool results.
Note:
The ArcGIS Web AppBuilder Search widget behaves similarly and returns incorrect suggestions.

Cause

This is a known issue. When ArcGIS Online searches through a string field, it returns features containing the keyword and the results are sorted by the OBJECTID field. For example, when entering '15' in the search box, it returns the first six records containing '15'.

Image of the OBJECTID field.

For more information, refer to BUG-000131478 and BUG-000114412.

Solution or Workaround

As a workaround, use the ArcGIS Web AppBuilder Search widget, and change its maximum number of suggestions to 0. This disables suggestions and returns results that match the search settings.

  1. Create an ArcGIS Web AppBuilder application from Map Viewer. Refer to ArcGIS Web AppBuilder: Create your first app for steps to do this. If an application exists, open its item details page, and click Edit Application.
  2. On the Widget tab, in the Search widget, click the Configure this widget The 'Configure this widget' button. button.
  3. In the Configure Search window, enter 0 for Maximum suggestions.
The Configure Search window.
  1. Set other parameters as desired, and click OK to save the configuration.
  2. Click Save, and click Launch to launch the Web AppBuilder application. The Search widget only shows the results that match the search settings (features with values that equal the entered keyword). In this example, the results only display the features with values that equal 15.
Image of the Search widget results.

Article ID: 000023510

Software:
  • ArcGIS Web AppBuilder
  • ArcGIS Online

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options