cancel
Showing results for 
Search instead for 
Did you mean: 

Autocomplete feature not working in Accelerator Storefront

former_member611299
Participant
0 Kudos

We are exploring the autocomplete feature for Accelerator Storefront in hybris 4.8 but search box does not come up with suggestions/typeahead at all. The required entries are present in schema.xml and solrconfig.xml. Indexer operation was launched again. But autocomplete functionality is not working.

Please suggest how can we get autocomplete feature in storefront web site . We have taken following steps to do this in HMC. • Click Solr Item Types . • Mark the “Use for auto-complete” check box for particular indexes like name, category and brand and save this. • Update the indexes by launching indexer operation wizard.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Have you checked to ensure that it is not a JavaScript related error? Press F12 on your browser for developer tools, and have a look at the log. You may have, for example, the "Uncaught TypeError: Cannot read property '0' of null" error message, which means your obj.images is null.

If you are able to still perform a search and see products (without autocomplete), then chances are that your SOLR indexing is correct and that the issue lies within the data being requested by the $.getJSON function.

My guess would be to check the SearchPageController, specifically the "getAutocompleteSuggestions()" method to see what the root cause is.

former_member611299
Participant
0 Kudos

Thanks Scott,

I found out the issue with my problem. The issue was that the server side method (/autocomplete) was there in the SearchPageController but the ajax code was not there in the Search component.

After adding the front end code the search autocomplete is working. However the result are not sorted. Do you know what do we need to do to sort the autocomplete results ? Is there any configuration we need to set?

Former Member
0 Kudos

, can you please share the changes you made on the javaScript side?