0

I'm using Sitecore 9 update 1 with SXA 1.7, I configured the search box suggestion mode to be "ShowsPredictions", I know that the implementation is in Sitecore.XA.Foundation.VersionSpecific.Services.SolrSuggester, I override it and changed a little bit and it worked, but when I changed the suggestion mode to be "ShowSearchResultsAsPredictions" it didn't work well, it seems that the implementation is at different location.

1

In the Search Box control properties you've three options for Suggestion Mode:

  • Show search results - those are standard search results displayed as suggestions if you will click on one of them you will be redirected to that item
  • Show predictions - those are the real suggestions which come from Solr suggester component
  • Show search results as predictions - those are standard search results but without links to those certain items, when you will click on one of those it will be put in the Search Box input

I don't know what are you planning to modify and it might be harder for those two options besides Show predictions but more details you will find in SearchController and GetSuggestions() method.

3
  • Yes, in "Show predictions" mode I overrided GetSuggesions() which is in the SolrSuggester to return the template name of the item, but in "Show search results as predictions" I can't find its implementation, I want to know its class so I can override it. Dec 5 '18 at 8:04
  • LIke I mention above - SearchController and GetSuggestions() method. But it might be tricky (still possible) to override this controller and I wouldn't suggest that. Dec 5 '18 at 8:40
  • I overrided GetSuggestions() but it works only in "Show predictions" mode, at "Show search results as predictions" it don't work, when I debug the GetSuggestions() is not called, so I think it's implemented something else, I want to know the current implementation, If it's in the SearchController, can you tell me please which dll to recompile to find the exact implementation. Dec 5 '18 at 9:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.