We're trying to implement a Web Map that allows users to search for buildings by name, however we can't quite get it working as we think a 'normal' user would expect.
Our dataset is a simple polygon dataset of libraries, which has a Text field called 'name' that is configured in the web map for searching. Some of the libraries have characters/words that cause problems, some examples below:
In the Web Map, you can configure searching as either a Contains search or an Equals search:
On the underlying 'LibrariesSearchTest' hosted feature layer the Full text index has been built for the 'name' attribute (this was created automatically):
The problem we have is that some words/characters seem to prevent the search function from working. Some examples below of the terms entered in to the search box and the outcome when the map was configured to do a Contains search and an Equals search:
Search term | Contains Search | Equals Search |
betty | works | works |
betty and | doesn't work (no results found) | works |
betty gordon | works | doesn't work (no results found) |
library betty | works | doesn't work (no results found) |
gonville | works | works |
gonville & | doesn't work (no results found) | works |
old lib | works | doesn't work (no results found) |
the old | doesn't work (no results found) | works |
st john | works | works |
john | works | doesn't work (no results found) |
john's | doesn't work (no results found) | doesn't work (no results found) |
st john's | doesn't work (no results found) | works |
st johns | doesn't work (no results found) | doesn't work (no results found) |
block | works | works |
block g | doesn't work (no results found) | works |
With a Contains search the main issue seems to be that certain words/characters/phrases aren't indexed as part of the Full text index (although I can't find anything in the docs) which means including words like 'the' or 'and' (or characters such as '&' or an apostrophe) in the search field stops the search function from returning anything.
In our use case I can see users trying to search for libraries using all the search terms in the table above, yet neither of the configurable options ('Contains' or 'Equals') return features for every search term.
There's some information on how searching works and how the indexes are used on the blog here from @RussRoberts: https://www.esri.com/arcgis-blog/products/arcgis-online/mapping/searching-for-features-in-maps-and-a... but it doesn't explain anything about reserved words or how to get around the issues encountered above.
Looking at the table above, the Equals option is slightly preferable, but it completely relies on users knowing the beginning of the library name and prevents them from being able to find features using subsequent words from the name (e.g. 'library').
I'm surprised that nobody else seems to have encountered this issue as it doesn't feel like something that is specific to our unique requirements. If anyone has any ideas how we can get around this I would very much like to hear from you.
Hi there,
I don't have an answer for you, but I've complained about this before on this post.
From the discussion in the comments, it doesn't sound like they would try to improve this functionality any time soon, but I also have not submitted an idea.
Hi @marksm_macomb, thanks for the reply and for directing me at your post. It's the same issue, I guess the same core search functionality underpins everything: Web Maps, Experience Builder, Instant Apps etc. etc.
I understand the responses on your post about words like 'and', 'the' etc. being so common that they might cause issues if they could be used with ESRIs world geocoder. However, I feel ESRI need to come up with a solution or workaround as, like you say, it's completely non-intuitive for every day users. Every other text based search system allows you to search using words like 'and' and 'the', it's what users expect. Imagine searching Google and having to specifically omit certain words, it's madness.
Assuming there is no fix/workaround for this, when I have some time I'll submit an idea. Thanks again.
Hey @RussRoberts, apologies for reaching out directly but do you have any thoughts on the post above? You authored the blog post that explains the changes to the search widget that were implemented back in Nov 2022. Whilst these changes may have improved performance when searching large datasets they do seem to have made it significantly harder for end users to use the search function in an intuitive manner. It seems we're not the only ones to have encountered this so any feedback/thoughts on how we could improve the user experience using the current search widget would be greatly appreciated. Happy to share a map that illustrates the problem with you if that helps.
No worries, if you have a map + SD file so I can check out indexes that would be great! Thanks!
Hey @RussRoberts, thanks for offering to take a look. Details below:
They're available to everyone, but I added your russell_jsapi account too so you should have full access.
This is just a test map and dataset so feel free to make changes. You can see from the table in the original post the search terms we're trying to enable. The map is currently configured to use the 'contains' search operation, the biggest problem with this configuration is when users enter certain words ('and', 'the', 'of' etc.) or characters (&, ', or single characters) these stop the search from returning any results.
Any help/tips/pointers would be greatly appreciated.
Hi @RussRoberts, did you manage to take a look at the map/feature layer above regarding the search indexes? Any help/advice on how we can improve the search function for users would be greatly appreciated. Thanks - Ian
Yup, I took a look and we spotted the issue. I think we will get a fix in for the next release this fall to support indexing these words.
Hey @RussRoberts, just testing this search index issue in the latest version of Map Viewer and it doesn't seem to be any different. I take it the fix to index words like 'and', 'of', '&' didn't make it in to this recent release? Do you have a bug/enhancement reference I can subscribe to so I'm notified with any updates? Any update would be gratefully received.
We weren't able to get these updates in for this release but still working on them for an update in the new year.