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 Name | Likely Search Term |
| Goat Café | Goat Cafe |
| Brück | Bruck |
| Møller | Moller |
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:
- 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.
- 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.