AnsweredAssumed Answered

Search widget very slow

Question asked by rhyck.m on Feb 3, 2016
Latest reply on Feb 3, 2016 by rscheitlin

Why is my search widget so slow? it takes about 5 seconds, sometimes more to return suggestions even thought the service has the capability support pagination to true.

here is the code:

  var searchAddress = new Search({
                    enableButtonMode: false,
                    enableLabel: false,
                    enableInfoWindow: true,
                    showInfoWindowOnSelect: true,
                    map: map
                }, "adrSearch");

                var sourcesAddr = []; //search.get("sources");
                    featureLayer: new FeatureLayer(".../AddressTypes/MapServer/0"),
                    searchFields: ["LSN"],
                    displayField: "LSN",
                    exactMatch: false,
                    name: "Address",
                    outFields: ["*"],
                    placeholder: "Search address",
                    maxResults: 25,
                    maxSuggestions: 25,
                    enableSuggestions: true,
                    minCharacters: 3
                searchAddress.set("sources", sourcesAddr);


here is the snapshot of service capabilities: