Sitecore SXA

The SearchStax Site Search solution integrates with the Sitecore Experience Accelerator (SXA) to speed up website production. It lets you reuse components, layouts, and templates across multiple sites.

SearchStax provides two special modules that work together to add SXA features in Site Search: the Sitecore Module and the Sitecore SXA Module. Used together, they let you publish a custom SXA search page almost immediately.

Create a Search App

The first step is to contact the SearchStax team and verify you already have a Search App created with a search index configured for your Sitecore.

First, Create a Search App!

You can't install the Sitecore Module until you've created a Search App.

The App must have suggestions enabled on the Auto-Suggest screen.

Sitecore SXA Package

The Sitecore Experience Accelerator (SXA) package is a prerequisite for installing the SearchStax SXA Module. Make sure the SXA Package is present in Sitecore. If not, install it. You can find details about this step and its prerequisites in Sitecore's official documentation.

Install the Sitecore Module

This module is almost a plug-and-play solution. Installation is straightforward and easy.

Below are the supported Sitecore versions with download links for the Sitecore Module package:

Sitecore Version Package WDP Package
Sitecore 9.1
Sitecore 9.2
SearchStax package for 9.1 and 9.2 WDP package for 9.1 and 9.2
WDP package for 9.1 and 9.2 CD
Sitecore 9.3
Sitecore 10.0
Sitecore 10.1
Sitecore 10.2
Sitecore 10.3
SearchStax package for 9.3 to 10.3 WDP package for 9.3, 10.0, 10,1, 10.2, 10.3
WDP package for 9.3, 10.0, 10.1, 10.2, 10.3 CD
Sitecore 10.4 SearchStax package for 10.4 WDP package for 10.4
WDP package for 10.4 CD
Sitecore SXA (All versions) SearchStax package for SXA WDP package for SXA
WDP package for SXA CD

Once you download the package, open the Sitecore Installation Manager:

Administrative dashboard showing Sitecore's main navigation menu with options for content editing, experience management, marketing controls, and develo...

Use the Choose package option to select the downloaded file and upload it to your Sitecore.

Nested installation dialogs showing package selection and file upload interfaces for SearchStax Sitecore integration.

Once the package uploads, it's time to install it. Click Next and then Install.

Package installation dialog showing SearchStax-for-Sitecore-SXA version 2.0.0 details with Install, Back and Cancel options.

The installation takes a few minutes. You'll know the installation is complete when you see this pop-up:

Installation confirmation dialog showing successful SearchStax for Sitecore package installation with options to restart client and server.

Click OK and continue with the next step.

Install the Sitecore SXA Module

Download and install the Sitecore SXA Module the same way you installed the Sitecore Module. This module is compatible with any Sitecore version since 9.3.

When you complete the installation, click the Configure SearchStax for Sitecore SXA Package button.

Configure the Modules

This button opens the list of Search Apps associated with your Sitecore project. You can reach this page from either the Sitecore Control Panel or the Launchpad whenever you want to change these values. The list starts out empty:

Empty sites dashboard showing index management table with columns for Index Core Name, Root Item, and Endpoint.

Click the Create an Index button. This opens the Sitecore Module Index configuration page where you can configure the search module.

Configuration form for Sitecore search showing required fields for app name, root items, passwords, and index rebuild settings.

  • Select your root Item(s). This is the Sitecore path where the index starts indexing. You can list multiple root item paths if different locations in your Sitecore content tree should be searchable. By default, the module indexes every page under /sitecore/content/home/.
  • Read Only Search Password and Admin Search Password: These are the "Read-Only API Credentials" and the "Read-Write Search API Credentials" from Site Search > Navigation Menu > App Settings > All APIs. Scroll down to find them. The system sets the User ID, but you can set the password (both read-only and read-write).
  • (Optional) You can enter the Hosted Search Page Password. Unless you know this password and've configured it previously, you can skip this field.
  • Reset Index When Rebuilding: Check this field if you want SearchStax to clear your index completely before rebuilding it. Keep in mind your index will be empty during the rebuild process, which might take several minutes. Your search page will return no results during this period.
  • Press the Save button.

Clicking Save returns you to the index list where you can see your new index:

The Sitecore index management interface showing a created index with its core name, root item path, and endpoint URL.

Populate Schema and Rebuild

After you install and configure the Sitecore module, run a Populate Schema operation on the search index to update its schema with the one used by Sitecore. For more details, see https://doc.sitecore.com/en/developers/90/platform-administration-and-architecture/solr-managed-schemas.html. This is a standard operation you must run on every search index used in Sitecore. It's straightforward. Open your Sitecore admin page and go to Control Panel > Populate Search Managed Schema.

Control panel dashboard highlighting the

Select your previously configured core name and then click Populate.

Schema populate dialog showing selected Sitecore plugin search index with the Populate button highlighted for schema update.

Once this operation completes, you should see a success message:

Confirmation dialog showing successful schema population for Sitecore Plugin search instance ss364581.

Go back to the Control Panel and click Indexing Manager. Select your previously configured core name and click Rebuild.

Indexing Manager dialog showing the ss364581-SitecorePluginSearch-37 index selected and the Rebuild button highlighted.

Usually, this takes just a few minutes. The time depends on how many items are in your Sitecore.

Once this operation completes, you should see a success message:

Confirmation dialog showing successful index rebuild completion with 4 units processed in 2 seconds.

Your schema is now updated and your SearchStax index is ready to receive indexed items and search queries.

Configure Site Search

After populating the schema and rebuilding the data, you can configure Site Search. Select your Search Fields, the data to display in Results, and create a Default Profile.

You can access Site Search directly at searchstudio.searchstax.com or click Search Management within Sitecore:

Search Management icon highlighted in the Sitecore SXA interface for configuring search fields and results.

  • Reload schema changes in Site Search
    • Go to Site Search > App Settings > All APIs > Search & Indexing tab.
    • Click Reload Schema. This syncs schema changes to the Search App.

Token management interface showing API access rights and a highlighted Reload Schema button in the lower right corner.

  • Configure Result Fields in Site Search
    • Go to Site Search > Configurations > Basic Configurations > Results Fields.
    • Select all fields to display in Result Items. You can map some fields to Result Cards to display them in a special way. Site Search offers two default mappings for Sitecore: url_s and title_text_en. Using these fields gives you results showing article titles you can click to view in Sitecore.
    • Click Publish.
  • Configure a Profile for Site Search. A Search Profile lets developers customize the search experience for different audiences. Each profile can have its own search fields, facets, stop words, expansions, and sorting options to tailor results to specific audiences.
    • Go to Site Search > Profile Selector > Profile list.
    • Site Search includes a default profile (MainProfile). You can create additional profiles later as needed.
    • Go to Site Search > Configurations > Basic Configurations > Search Fields. Site Search is preconfigured to search renderedcontent_txts_en. You can add searchable fields now or return to change them later.
    • Click Publish to publish the Search Profile.

Make SXA Rendering Available

Add the SearchStaxPageSXARendering and SearchStaxSXAStyling to the list of available renderings. Right-click Tenant/Site/Presentation/Available Renderings and create a new SearchStax item. After creating the item, edit its Rendering field and add Layout/Rendering/Feature/SearchStax SXA/SearchPage SXA/SearchStaxPageSXARendering and /sitecore/layout/Renderings/Feature/SearchStax SXA/SearchPage SXA/SearchStaxSXAStyling. Then click OK:

Dialog box for selecting SXA renderings shows a tree structure with Layout components and two SearchStax items highlighted in the Selected panel.

Quick info panel showing SearchStax item details including ID, path, template, and available renderings configuration settings.

Create an SXA Search Page

The setup is complete. Now it's time to create the search page. First, create a search page item using any template you want. Then open it in Experience Editor. Open the Toolbox on the right and find the SearchPage SXA section:

Experience Editor interface showing the toolbox with SearchPage SXA components expanded in the right sidebar.

Drag and drop the two renderings into placeholders. Use the Edit Components Properties button to open the editor and select a previously created data source item. (You can create this using the Content Editor.) This data source must use the /sitecore/templates/Feature/SearchStax SXA/SearchStax Settings template:

Control Properties dialog showing placeholder and data source configuration fields for an SXA rendering component.

SearchStax configuration panel showing index settings and search model definition fields for Sitecore SXA integration.

Click OK and save the page. Publish everything, then open the published search page:

Search interface showing search results with two home pages listed, displaying breadcrumb navigation and page descriptions.

Your search page now uses SearchStax as a search provider and powers your search queries.

Computed Fields

The Sitecore Module includes several computed fields out of the box. These fields improve your initial search page experience, but you can replace or remove them as your project evolves.

For general information on Sitecore's computed fields, see https://doc.sitecore.com/xp/en/developers/91/platform-administration-and-architecture/create-a-computed-index-field.html.

ResultTitle

This field contains the result item title, based on the Sitecore item DisplayName property. If that's empty, it returns the Name property value.

This field isn't required for the module to work properly. However, the module uses this field as the result template title. If you remove or change it, don't forget to change the Site Search config connector.fields.title property in /Views/SearchStaxPage/Index.cshtml.

ResultURL

This field contains the result URL. For media items, it uses the native Sitecore MediaManager.GetMediaUrl method. For non-media items, this field defines the current website context. It uses the indexed item Paths.FullPath property and finds a website definition with the same Database property value and a RootPath that's a parent of the current item. After finding the website context, it uses the native Sitecore LinkManager.GetItemUrl method to get the item URL.

This field isn't required for the module to work properly. However, the module uses it as the result template clickable URL. If you remove or change it, don't forget to change the Site Search config connector.fields.url property in /Views/SearchStaxPage/Index.cshtml.

RenderedContent

This field contains a string value that improves website search relevance. It indexes the current item text fields and the text fields from every data source in the <indexedrenderings></indexedrenderings> configuration list.

To add new template IDs to this list and make them indexable by this computed field, edit the <indexedrenderings></indexedrenderings> node children's values in the App_Config/Modules/SearchStax/SearchStax.Connector.Provider.config file.

This field isn't required for the module to work properly. You can remove it from your index if you want.

Articles in this section