Web AppBuilder search widget - can no longer 'deep' search by layer attributes

720
3
Jump to solution
11-29-2022 12:54 PM
Labels (1)
AndrewOldham
New Contributor II

Hi!

We just noticed that our Web AppBuilder apps within AGOL are no longer allowing for searching layer attributes using 'contains' logic. For example if I have a parking code attribute of 'PK14120' and I only input '14120' into the search widget now, I get no results. I have to start with the 'PK' to start getting suggestions and results.

I saw a similar post here: https://community.esri.com/t5/arcgis-api-for-javascript-questions/search-widget-4-25-deep-searching-...

which referenced this: https://developers.arcgis.com/javascript/latest/release-notes/#search-performance-improvements

I'm assuming that the Web AppBuilder search widget is using the same 4.25 search API. If so, is there any out of the box work around for this? It's a pretty big change for our users who commonly only search on ID numbers instead of the entire ID string.

0 Kudos
1 Solution

Accepted Solutions
GreggRoemhildt2
New Contributor III

Here's a summary of my interactions with esri support:

# if you are using a hosted layer:

You can use addToDefinition to update the layer you want with the required index. This will then magically work as expected

If you are using non-hosted (arcgis server) services

1. you can put a % in front of your searches. (haha - tell your non techy staff to remember that one)

2. you can configure a custom app to add a prefix % to the search widget - this would not apply to expb but would be a custom javascript app you'd write

3. you can also configure a custom app use an interceptor to search for all requests that contain the LIKE clause and apply the leading percent character.

 

See some notes here:

https://community.esri.com/t5/arcgis-online-questions/searching-adresses-requires-the-whole-exact-ph...

View solution in original post

3 Replies
GreggRoemhildt2
New Contributor III

I too would like to know the answer to this. I've already submitted a ticket to Esri support and will follow up when tech support provides an answer.

GreggRoemhildt2
New Contributor III

Here's a summary of my interactions with esri support:

# if you are using a hosted layer:

You can use addToDefinition to update the layer you want with the required index. This will then magically work as expected

If you are using non-hosted (arcgis server) services

1. you can put a % in front of your searches. (haha - tell your non techy staff to remember that one)

2. you can configure a custom app to add a prefix % to the search widget - this would not apply to expb but would be a custom javascript app you'd write

3. you can also configure a custom app use an interceptor to search for all requests that contain the LIKE clause and apply the leading percent character.

 

See some notes here:

https://community.esri.com/t5/arcgis-online-questions/searching-adresses-requires-the-whole-exact-ph...

AndrewOldham
New Contributor II

Thanks @GreggRoemhildt2!! Sounds like I'm kind of stuck for the time being. Pretty much all the layers I've been using this against are non-hosted (ArcGIS Server). Adding the % isn't great but I guess it is what it is.

For any others - from the above thread: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/searching-for-features-in-maps-and-a...

0 Kudos