Select to view content in your preferred language

Search widget incorrectly showing "No search results" prior to pressing Enter

958
5
Jump to solution
04-23-2024 07:27 PM
COwen
by
Emerging Contributor

Hello there,

I'm using the Search widget for two feature layers in an Experience Builder application. As shown below, I'm searching within 5 fields for this particular feature layer. I can get search results without pressing Enter for some of the fields but for others I get "No search results" and have to press Enter to see the results. Why might this be the case? There are differences between them (e.g. max length, whether null values are allowed) but I can't imagine it's related to these differences.

COwen_0-1713924014463.png  COwen_1-1713925282654.png

Also, for all of the 5 fields, I get "No search results" for text that is not at the beginning of the string and have to press Enter to see the results. Is there a way to resolve this, even if this means removing all search results before pressing Enter?

Many thanks

2 Solutions

Accepted Solutions
ShengdiZhang
Esri Regular Contributor

Hi @COwen ,

Due to performance issues, different search methods are used to get search suggestions and search results. Search suggestions use "Start with" or full-text index, while search results use "Contain".

There is currently an issue in our repo to remove "no results" from search suggestions.

Regards,

Shengdi

View solution in original post

TimWestern
Frequent Contributor

As a dev I have seen this happen in lots of different ways. I think its important to remember as you type into search, that what you get are 'suggestions' and not always 'accurate results'.

Case in point, I was looking for a property on a street the other day and I thought it was on 709 5th St SW
Then I noticed there was a SE, NE, and NW and also a 709 5th Ave version as well.  I clicked around and realized, that it was giving me suggestions based on common lookup queries, not necessarily based on some index of the layer data as it was presented.  Because when I clicked on each of them I noticed that I had 2 different houses, w 4 suggestions in the search box, but only 1 when clicked, showed the actual property address. 

I think ArcGIS has the potential for addresses for example along lines, and will place them where they might be expected to appear even if there is no mapped property at that location.

This is just one illustration that I've seen recently that explains some of this.


The one thing I will add, is depending on how fresh your computer/browser session is, you might not get many suggestions at all, because that lookup has not had many searches done in your session.  The browsers, like to suggest or autocomplete at times when it sees what looks like form fields, so it may not be the widget doing that, but the browser. That's another thing to keep in mind.

View solution in original post

5 Replies
ShengdiZhang
Esri Regular Contributor

Hi @COwen ,

Due to performance issues, different search methods are used to get search suggestions and search results. Search suggestions use "Start with" or full-text index, while search results use "Contain".

There is currently an issue in our repo to remove "no results" from search suggestions.

Regards,

Shengdi

COwen
by
Emerging Contributor

Hi @ShengdiZhang,

Thanks so much for your reply. That is very useful to know.

What would be your explanation for why some fields don't get search suggestions (using "Start with" or full-text index) while others do?

Many thanks,

Caitlin

0 Kudos
TimWestern
Frequent Contributor

As a dev I have seen this happen in lots of different ways. I think its important to remember as you type into search, that what you get are 'suggestions' and not always 'accurate results'.

Case in point, I was looking for a property on a street the other day and I thought it was on 709 5th St SW
Then I noticed there was a SE, NE, and NW and also a 709 5th Ave version as well.  I clicked around and realized, that it was giving me suggestions based on common lookup queries, not necessarily based on some index of the layer data as it was presented.  Because when I clicked on each of them I noticed that I had 2 different houses, w 4 suggestions in the search box, but only 1 when clicked, showed the actual property address. 

I think ArcGIS has the potential for addresses for example along lines, and will place them where they might be expected to appear even if there is no mapped property at that location.

This is just one illustration that I've seen recently that explains some of this.


The one thing I will add, is depending on how fresh your computer/browser session is, you might not get many suggestions at all, because that lookup has not had many searches done in your session.  The browsers, like to suggest or autocomplete at times when it sees what looks like form fields, so it may not be the widget doing that, but the browser. That's another thing to keep in mind.

COwen
by
Emerging Contributor

Hi @TimWestern,

Thanks so much for your response. That gives much more context for what's happening with search suggestions.

Thanks again,

Caitlin

0 Kudos
TimWestern
Frequent Contributor

I hadn't thought about optimization happening behind the scenes impacting, but this matches what I would have thought.  Thanks for sharing.

0 Kudos