Select to view content in your preferred language

Contains search in Map Viewer doesn't work if configured against a View that has an Area Of Interest defined

529
8
06-28-2024 07:22 AM
Labels (1)
MappyIan
Frequent Contributor

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
8 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
Frequent Contributor

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
Frequent Contributor

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?

MappyIan
Frequent Contributor

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
MichaelBruening
Frequent Contributor

Adding a bit more to this thread... I have been unsuccessful in using the search function on a Hosted Feature Service View without an area of interest applied for my original and a newly created HFS views. I had to recreate a new HFS view from a newly published HFS from ArcGIS Pro a few weeks ago.

Oddly enough, I could not search on this new HFS when loaded into a new web map and enabled the layer search on a defined field. This occurred even when loading the HFS into a fresh web map also.

Taking it the step further, I am using this same HFS View within a Web Mapping Application that is meant for data extraction. I have a completely new web map setup with the same newly created HFS View loaded. When using the "Screening" app within the WMA, I can search the same data layer and find the features that I cannot find within the Web Map. This new web map does is not configured for searching by layer.

I believe this functionality worked back in spring of this year when the original project map was established.

One other thing that seems off to me is when I look at the web map details under the settings the "Save" button is always active if I leave the "Settings" page to the "Overview" tab and then come back to "Settings" tab; even though there has not been a change within that section of the settings. I do not recall this happening prior to this year, but I could be wrong.

We were able to use this functionality last year and hopefully this is restored quickly as it is integral to how we setup our web maps for use within Field Maps to allow our field crews to find pertinent information.

0 Kudos
MappyIan
Frequent Contributor

Hey @MichaelBruening, I don't know if this helps your specific situation, but ESRI made some changes to the way searching works at the end of 2022.  Details are in this blog post: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/searching-for-features-in-maps-and-a...

These changes have made searching less than intuitive for end users as certain words now prevent the search from returning any results.  There's a bit more info on this community forum post: https://community.esri.com/t5/arcgis-online-questions/text-searching-behaviour-non-intuitive-to-end/...

I think (I could be wrong!) searching in Instant Apps is configured separately and doesn't behave in the same way as in a standard Web Map, which could explain why searching is working in your 'Screening' app but not in the Web Map.

Hope this helps.

0 Kudos
MichaelBruening
Frequent Contributor

Thank you for lending the information above, but I am still having issues with the search functionality within my maps; even after the managed index was built.

One other thing that I discovered while attempting to figure out the search issue was that we no longer have the ability to turn on and off the "Offline" status of individual maps, but instead it is controlled in other manners. I wish we could still turn this on and off per map instead of per HFS.

I have messaged @RussRoberts directly hoping for some assitance with this. I am sure it will be a more robust tool, but understanding how it works and what needs to be done for it to function is the key.

The hardest part was telling my field crews to just do a "search" for the features and they will be returned only to find out everyone was unwilling to speak up that the functionality was not working.

Thank you

0 Kudos