Select to view content in your preferred language

Searching in Map Viewer for accented characters and apostrophes

167
6
Wednesday
Labels (2)
MappyIan
Frequent Contributor

We are creating a public facing web app that contains buildings and have enabled the ability to search by building name.  However we've hit a problem searching for buildings where the name of the building includes an accented character.  Couple of examples below:

Building NameLikely Search Term
Goat CaféGoat Cafe
BrückBruck
MøllerMoller

 

Searching works fine in the app for all three of these examples, providing the user enters the relevant special character (e.g. searching for 'goat café' returns the correct building, but searching for 'goat cafe' does not return the building).  The issue is that the general public are more than likely to enter a search term that does not include the accented character, as shown in the 'likely search term' column above.

In an ideal world, the search function in the web map should return the Goat Café feature if a user searches for 'goat café' or 'goat cafe'.  Is anyone at ESRI able to confirm if this is possible or likely to be implemented in a future update to Map Viewer/ArcGIS Online?

In the meantime I can think of two workarounds, neither of which is ideal:

  1. We strip out the accented characters from the name column in the data, e.g. we change 'Goat Café' to 'Goat Cafe'.
    • The advantage of this approach is that searching for 'goat cafe' will return the correct building.
    • The downside is that the name isn't actually correct as the building is called 'Goat Café'.  This might seem trivial for cafés, but for the other examples above where the buildings are named after specific individuals it is much more important.
  2. We add an additional field to the data called something like 'alternative name' to store modified names that we think users will use when searching and then enable both columns in the search settings of the Web Map.
    • The advantage of this approach is that searching for 'goat café' would find the correct feature by searching the 'name' column; and searching for 'goat cafe' would also return the correct feature by searching the 'alternative name' column.
    • The downside is that if a user searches for just 'goat' both results will be presented to the user, which could very easily cause confusion (as there is only one 'Goat Café'.

Is anyone aware of any other workaround that would present the results in a more user friendly manner and make it look like the search was working as a normal user would expect?

Additionally, related to all the above examples is the problem of apostrophes.  These are slightly different in that the apostrophe is an additional character in a building name rather than being an accented version of an existing character (e.g. e and é).  For example the dataset includes lots of buildings that include the word: 'King's' in their name, e.g. 'King's House'.  The reality is that most users will search without the apostrophe (e.g. 'Kings House') but some users will search with the apostrophe.  Regarding apostrophes, ideally the search function in the web map would return the King's House feature if a user searches for 'King's House' or 'Kings House'.  The workarounds identified above apply in this situation too but, as with the accented characters, neither are ideal.

Does anyone have any ideas how better to handle searching where the searched value contains an apostrophe?  Or is anyone from ESRI able to offer any advice or know if any improvements are in the roadmap for ArcGIS Online?

I can't believe we're the only ones to have come up against this issue, but I can't find any other posts on the topic on this community forum.

0 Kudos
6 Replies
Roger_Schulz
Occasional Contributor

My initial thought is to use Create Locator in Arc Pro. Include in your table an alternate name field with no special characters. Use the Point of Interest Role. 

Roger_Schulz_0-1727276564546.png
Just a quick thought to get you started. 

 

0 Kudos
MappyIan
Frequent Contributor

Hi @Roger_Schulz, thanks for the reply.  I did think about a Locator as they seem to behave differently and return results with apostrophes even if you omit them from the search term.  However, we're using the Search function against the Buildings layer as we want to select the feature to show information in a popup, not just pan/zoom the map to the feature (which is all a Locator will do).

Thanks for the response though.

0 Kudos
gis_KIWI4
Frequent Contributor

@MappyIan - Would you use the experience builder search widget?
This may be helpful but it requires turning off search suggestions which are autopopulated when the user is typing. This builds on the second suggestion. The downside is that you need to press enter for the search results. 

Data - 

gis_KIWI4_5-1727328120773.png

This is what it looks like -  

gis_KIWI4_4-1727328082588.png

gis_KIWI4_7-1727328159399.png

gis_KIWI4_8-1727328218095.png

Setup of the ExB Search Widget

gis_KIWI4_9-1727328316629.png

Maybe this could work for you. 

====================================

 

I wish there was a way to control what's displayed in the search suggestions.

gis_KIWI4_10-1727328526529.png

 

 

 

 

 

 

 

 

0 Kudos
MappyIan
Frequent Contributor

Hi there @gis_KIWI4, thanks for the suggestion.  Unfortunately we can't do this in Experience Builder, we're actually building a web app using the ArcGIS Maps SDK for JavaScript.  Our custom web app just uses the search options configured in the Web Map.  It seems like the problem is a fundamental issue with the way ESRI have configured the searching in the functionality that underpins Map Viewer (and also the Maps SDK for JavaScript).

I can't believe we're the only ones to have come across this problem as anyone creating public-facing apps is going to have the same issues (in my opinion).  Everyone is used to searching in Google and that just works in a way that is intuitive.  Having to specifically include/exclude accented characters and/or apostrophes is just not how people expect modern web apps to behave.

gis_KIWI4
Frequent Contributor

Ah fair enough.
I have no experience in that space! 
All the best. 

0 Kudos
MappyIan
Frequent Contributor

In the absence of any workable solutions, I've logged this as an idea.  All Kudos on the idea would be much appreciated:

https://community.esri.com/t5/arcgis-online-ideas/improve-text-search-function-to-ignore-accented/id...