Select to view content in your preferred language

Contains search in Map Viewer doesn't work

201
5
3 weeks ago
Labels (1)
MappyIan
Occasional Contributor II

I have a hosted feature layer view that contains three layers and three related tables.  I've created a web map from this hosted feature layer and configured the Search options on the web map (settings tab) to do a contains search against the relevant fields of each of the map layers and one of the related tables:

MappyIan_0-1719583563659.png

However, in the map, the search function doesn't seem to work.  The screen grab below shows the Buildings layer turned on and labelled with the 'name' attribute.  There is a building called the 'David Attenborough Building', yet searching for 'david' or 'attenborough' doesn't return any results:

MappyIan_1-1719583787688.png

I get the same behaviour for the other two spatial layers ('Colleges' and 'Porters Lodges').  But the related table does work as expected and shows results from a 'contains' search, as shown below:

MappyIan_2-1719583909873.png

If I change the search settings of the three layers from Contains to Equals then I get better results:

MappyIan_3-1719584026314.png

Now when I search in the map against the 'Building' layer for 'david' it does indeed find the David Attenborough Building:

MappyIan_4-1719584132230.png

Furthermore, I'm able to use the % symbol as a wildcard so searching for '%atten' also finds the David Attenborough Building:

MappyIan_5-1719584164743.png

I'm pretty sure this used to work, so I'm wondering if something got broken in the most recent update to ArcGIS Online this week?  The specific issues seem to be:

  1. The Contains search doesn't seem to work at all for layers, but does work for tables;
  2. The Equals search actually performs a Begins with... search.

Am I missing anything or have I misunderstood how this is meant to work in Map Viewer?  The documentation (https://doc.arcgis.com/en/arcgis-online/create-maps/configure-feature-search.htm) is pretty sparse and doesn't say much other than: 'Choose whether the result should contain or be equal to the search terms.'

Any help would be greatly appreciated.

0 Kudos
5 Replies
RussRoberts
Esri Notable Contributor

Are you able to share your map and layers and I can take a look? You can drop them into a group and invite russell_jsapi into it. thanks! 

MappyIan
Occasional Contributor II

Hey @RussRoberts, thanks for getting in touch.  I've shared the map and layers with you, so hopefully you can see the issue.  Any help would be greatly appreciated.

0 Kudos
RussRoberts
Esri Notable Contributor

Do you see it working against the original FL instead of the view? I see the fulltext not working as expected on that view layer but just checked against some of mine and they were working. 

0 Kudos
MappyIan
Occasional Contributor II

Hi @RussRoberts, apologies for the delay, I've been on leave.  I've done a bit more testing and I think I've found the problem.

I created a new Web Map that used the hosted Feature Layers (not Views) and the Search function works as expected with both the contains and equals operations.

This made me think there is a bug when searching using Views, but your reply suggests that searching with View layers is working fine for you so maybe there is a problem with my specific View.  So I created a brand new View from the Feature Layer and added that to a new Web Map.  Searching then worked fine in the new Web Map for both contains and equals operations.

I then edited this new View to set an Area of interest so that only a small area of the dataset is exposed in the View (as this is how my original View is configured) and applied this area of interest to all layers using the Apply to all layers button:

 

MappyIan_1-1721125554149.png

Having done this, going back to the Web Map, the Search function no longer works for the spatial layers (buildings, colleges, porters lodges) but works fine for the related table.

I think the reason the search still works fine against the related table is because the related tables are not affected by the 'Area of interest' setting in the View, as shown by the absence of the filter button against the related tables in the Update View window for the three related tables:

MappyIan_2-1721125832946.png

So, it seems there is a bug with the Search function specifically when an Area of interest is configured against a View.

It would be really good if you could confirm you get the same behaviour and advise the best way to get this resolved.  Should I log a support ticket with my local ESRI support team here in the UK?

0 Kudos
MappyIan
Occasional Contributor II

Adding a bit more info to this thread for completeness.

I'd assumed that removing the Area of interest from the View would resolve the searching issue, but unfortunately that doesn't seem to be the case.  The only resolution that I can see is to create a new View, without any 'Area of interest', add this to your Web Map and copy over all the configuration in the map.  Something must get broken in the View, but I can't see what, none of the search settings are exposed in the View details page in the AGOL interface so it must be something behind the scenes.  All in all, it's really annoying.

0 Kudos