Troubleshooting auto-completion

This article provides advice on how to debug issues wih auto-completion.

Auto-completion is not returning any suggestions

  • Open up the browser debugger and view the network panel. Start typing into the search box and watch the network panel for any requests to suggest.json. If you can see requests being sent then view the response from one of these. The response should contain a JSON packet with any suggestions. If the JSON is empty then there are either no suggestions to return, or autocompletion may not have been generated. If you are using concierge auto-completion there will be a suggest.json request for each column of the auto-completion. Also check the parameters passed to suggest.json and confirm that the correct collection/profile parameters are passed (these are based on the Javascript configuration and won’t necessarily match the collection and profile used for the search query).

  • Open up the browser debugger and view the Javascript console. Refresh the page and check to see if there are any errors occurring that might stop the Javascript from processing.

  • Check the HTML source for the page and ensure that all the auto-completion resources and dependencies are being downloaded and that there are not multiple versions of any dependencies (e.g. JQuery) being imported. If there are multiple versions of JQuery the order in which the files are loaded is important. If a version of JQuery is loaded after auto-completion was initialized it overwrites the JQuery object and auto-completion won’t be set up correctly. When this happens there will be errors logged to the Javascript console relating to missing functions.

Auto-completion suggestions not displaying

If suggest.json is returning suggestions but they are not displaying, or are displaying [Object object] then the problem is likely to be in the Javascript configuration for the auto-completion template or in the styling used within the template.

Also make sure that you check to ensure that all the fields you require are returned in the auto-completion JSON. It is possible that fields were missing in the CSV used to generate the auto-completion.

Removing terms from auto-completion

Non-CSV based auto-completion suggestions are based on words found within the spelling index. Terms can be added or removed from the set of suggestions by editing the spelling black and white lists for the search package that is used to generate the auto-completion.

Auto-completion not generated during update

Check that auto-completion=disabled is not set in the results page configuration.

Also check the Step-BuildAutocompletion logs for the search package and look for errors and also for the counts of how many suggestions were generated. If the suggestions are CSV based there could be an issue with the CSV file format. Also check the results page options corresponding to the auto-completion data set profile to ensure that the index isn’t scoped in a way that it no longer contains any results. This will cause an empty suggestions file to be generated.

Auto-completion is returning duplicate suggestions

This can occur if your auto-completion is misconfigured to use the deprecated simple json format. If the legacy json format is being used then you will see the trigger value being displayed in your auto-completion instead of the display value. If you have CSV based suggestions you will often have several suggestions triggered by the same trigger word, and this is what’s causing the duplication.

Check your auto-completion configuration to ensure that the auto-completion fmt is set to json++ when requesting suggestions from the auto-completion endpoint.

If you are using the Funnelback auto-completion widget then ensure the Javascript configuration sets format: 'extended'. (see: Auto-completion widget - data set source configuration)

If you are using your own code to call auto-completion then look at the code that makes the request to suggest.json and ensure the fmt parameter is set to json++.

See also