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:
Use the Choose package option to select the downloaded file and upload it to your Sitecore.
Once the package uploads, it's time to install it. Click Next and then Install.
The installation takes a few minutes. You'll know the installation is complete when you see this pop-up:
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:
Click the Create an Index button. This opens the Sitecore Module Index configuration page where you can configure the search module.
- 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:
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.
Select your previously configured core name and then click Populate.
Once this operation completes, you should see a success message:
Go back to the Control Panel and click Indexing Manager. Select your previously configured core name and click Rebuild.
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:
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:
- 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.
- 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:
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:
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:
Click OK and save the page. Publish everything, then open the published search page:
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.