JS API 4.11 - Search suggestions not displaying for search layers configured in Enterprise map settings

804
4
Jump to solution
05-15-2019 07:25 AM
JustinKirtz
New Contributor II

I'm referencing a portal item map built in ArcEnterprise and I'm trying to set up layer searching. I've configured the layer search settings in the portal map settings as seen here:

The only layer that returns the search suggestions panel in my JS 4.11 app is the 'SC DOT Projects' layer:

All of the other layers should also return suggestions, as they each have a feature with an 'r' in them, but it doesn't work and I'm not sure what I'm doing wrong. Technically the search works for the layers, as it will search if I select the dropdown arrow, select the individual search layer, and then hit enter but no search suggestions will display which makes it hard for a user to properly search. The 'SC DOT Projects' map service isn't a service that I've published, SC DOT did, so maybe something is wrong with my map service settings?

Thanks y'all,

-Justin

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Justin,

   Go to the rest service page for one of those specific layers and look for:

Advanced Query Capabilities:

    Supports Statistics: true
    Supports OrderBy: true
    Supports Distinct: true
    Supports Pagination: true
    Supports TrueCurve: true
    Supports Returning Query Extent: true
    Supports Query With Distance: true
    Supports Sql Expression: true
    Supports Query With ResultType: false
    Supports Returning Geometry Centroid: false

View solution in original post

4 Replies
RobertScheitlin__GISP
MVP Emeritus

Justin,

   The other map services may not meet the requirements.

Suggestions are enabled for:

10.3 or later feature layer that supports pagination, i.e.supportsPagination = true

0 Kudos
JustinKirtz
New Contributor II

Robert,

Thanks for the reply. How do I check this? I published the map service with ArcMap 10.6.1 to Enterprise 10.6.1. My source files were shapefiles, could that be the issue?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Justin,

   Go to the rest service page for one of those specific layers and look for:

Advanced Query Capabilities:

    Supports Statistics: true
    Supports OrderBy: true
    Supports Distinct: true
    Supports Pagination: true
    Supports TrueCurve: true
    Supports Returning Query Extent: true
    Supports Query With Distance: true
    Supports Sql Expression: true
    Supports Query With ResultType: false
    Supports Returning Geometry Centroid: false

JustinKirtz
New Contributor II

OK thanks, I republished the service with feature classes instead of shapefiles and that fixed it.

 

-Justin

0 Kudos