AnsweredAssumed Answered

search widget only returning first value

Question asked by FriediL on Feb 2, 2016
Latest reply on Mar 3, 2016 by darinatch

I use the search widget to allow the user to find features in a Feature Layer.

I created several searches - one for each field - but all querying the same layer. Generally the search is working. However I do encounter two problems:

a) I don't get any suggestions while I have set, enableSuggestions: true,
It does return suggestions for the Geolocator but not on my Feature Layer. I tried it working on the following sample code: ArcGIS API for JavaScript Sandbox and just exchanged the feature layer with my feature layer (and changed the field names accordingly) and while with the current code I do get suggestions I don't get them as soon as I use my feature layer. So I'm wondering are the suggestions only working on layers using http but not https? Or is there anything that needs to be authorized when publishing the layer?

b) When I select my layer from the drop-down options the widget only returns one value, probably the first it finds. For example, I let the user query by country name. Say the user enters "USA" I was hoping the widget would return a list of all points which have the field country filled with USA but instead it just zooms to the first point (while I'm sure there are more). When I use "All" in the layer drop down options I get a first option but at the same time the popup allows me to click on the "Show more results". Which is what I also like to see when just querying my layer. Is that possible?