Notice that I haven’t specified any ‘lookupImpl’ or ‘dictionaryImpl’ in the search component, so Solr uses the default implementations which requires no additional parameters. You can add your preferred implementations and pass the required parameters.

Also note the ‘field’ name to use for suggestions. I have added the ‘sxacontent_txm‘ which is where SXA indexes most of the page content.

The ‘sxacontent_txm’ is a dynamic field of type text_general which is multivalued, stored and indexed:

Once you place the new sections into the solrconfig.xml file, save it and then reload the master/web core by going to Solr Admin page > Core Admin, select your master/web core and click on reload. After few seconds the button should light up in green to show that it restarted successfully.

Finally, go to Sitecore and rebuild your index.

Testing Solr’s suggester handler and component:

In order to test that Solr has been configured properly, place the following URL into your browser, edit the core name and hit enter:

If you see a ‘HTTP ERROR 404’ message, this means Solr can’t see your new ‘suggest’ request handler in the selected core. This could be caused by adding the ‘suggest’ section into the wrong core or you have not reloaded your core.

You should instead see something similar to the following:

<response>

<lstname=”responseHeader“>

<intname=”status“>0</int>

<intname=”QTime“>1</int>

</lst>

<lstname=”suggest“>

<lstname=”mySuggester”>

<lstname=”a“>

<intname=”numFound“>1</int>

<arrname=”suggestions“>

<lst>

<strname=”term“>admin</str>

<longname=”weight“>2</long>

<strname=”payload“/>

</lst>

</arr>

</lst>

</lst>

</lst>

</response>

This means your suggester works just fine.

You may also see no suggestions returned:

<response>

<lstname=”responseHeader“>

<intname=”status“>0</int>

<intname=”QTime“>0</int>

</lst>

<lstname=”suggest“>

<lstname=”mySuggester”>

<lstname=”a“>

<intname=”numFound“>0</int>

<arrname=”suggestions“/>

</lst>

</lst>

</lst>

</response>

Which means you either have no content data, no data that matches your query or you have not rebuild your index.

Finally

Finally, go to your SXA page in preview or normal mode (not edit mode), test it out by typing at least two characters and enjoy!