Integrations Archives - SearchStax Docs Documentation Tue, 14 Nov 2023 18:20:24 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.2 https://www.searchstax.com/docs/wp-content/uploads/2023/10/cropped-favicon-32x32.png Integrations Archives - SearchStax Docs 32 32 Sitecore Module 2.0.0 https://www.searchstax.com/docs/searchstudio/sitecore-module-2/ Fri, 29 Jul 2022 17:08:51 +0000 https://www.searchstax.com/docs/?post_type=searchstudio&p=12130 Sitecore Module 2.0.0 SearchStax provides a special module that connects Sitecore directly to SearchStax Studio and lets you publish a custom search page immediately. Contents: What is the Sitecore Module?… Continue reading Sitecore Module 2.0.0

The post Sitecore Module 2.0.0 appeared first on SearchStax Docs.

]]>
Sitecore Module 2.0.0

SearchStax provides a special module that connects Sitecore directly to SearchStax Studio and lets you publish a custom search page immediately.

Contents:

What is the Sitecore Module?

This package is a Sitecore module that Sitecore developers can install to leverage all the search capabilities offered by SearchStax Studio for your client-facing search pages. It contains a Sitecore index connector which can index your Sitecore items using the out-of-the-box Indexing Manager provided by Sitecore. Not only that, but it comes with a functional search page that can be built in minutes instead of weeks of work. With this package your client can focus immediately on improving the real search experience, since that is where the business value is.

First, create a SearchStax Studio App!

You cannot install the Sitecore Module until you have created a SearchStax Studio App.

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

One Sitecore Server per SearchStax Studio App!

To prevent data corruption and/or bad website results, do not connect two different Sitecore Content Management servers to the same SearchStax Studio App.

Install the Sitecore Module

The first step is to contact SearchStax team and ensure you already have a SearchStax Studio account and App created with Solr core configured to deal with your Sitecore. Once you have this you are ready to go.

This is almost a plug-and-play module, thus installing it is as easy as possible.

Below are the supported Sitecore versions, with the links for downloading the Sitecore package:

Sitecore Version Package WDP Package
Sitecore 9.0 SearchStax package for 9.0 WDP Package for 9.0
WDP Package for 9.0 CD
Sitecore 9.0 Update 2 SearchStax package for 9.0.2 WDP package for 9.0.2
WDP package for 9.0.2 CD
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, 10.0, 10.1, 10.2, 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 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 File option to select the downloaded file and upload it to your Sitecore.

Once the package is uploaded it’s time to properly install it. You can do this by clicking on Next and then on Install.

The installation should take no more than a few minutes. You will know the installation is completed when you see the below pop-up. Go ahead and click on the Configure SearchStax for Sitecore Package button:

 

Configure the Sitecore Module

Navigate to the SearchStax Module Configuration Page

From the Sitecore Launch Pad, click on the Sitecore Module Configuration button under SearchStax Site Search

This will open up the the Site Search for Sitecore configuration page.

Enter credentials and select account and app.

  1. Start by entering your SearchStax Studio username and password. Then press the Load Accounts button. This will populate the Search Studio Account drop down.
  2. Select the appropriate SearchStudio Account. It’s probable only one account is available, but you might have access to multiple accounts. Once selected, this will populate the available Search Apps within the selected Studio Account.
  3. Select the appropriate Search App.
  4. Once you have selected the above options, then press the Create an Index button.

Configure Site Search for Sitecore

The next page that the configuration will take you to is the Index Properties page for the Search App that you selected in the previous step.

In the case that your Search App is using Basic Authentication, go here. Otherwise, follow these directions:

  1. Select your root Item(s). This is going to be the Sitecore Path where the Index should start it’s indexing from. You can list multiple root item paths if there are multiple locations within your Sitecore Content tree that content should be searchable from. By default, the module will index every page under /sitecore/content/home/.
  2. (Optional) You are given an opportunity to enter the Hosted Search Page Password. At this point, unless you know what this password is, and you have previously configured it, we can safely skip this field.

  3. Press the Save button. Now move on to the next step.

Configure Site Search for Sitecore with Basic Authentication:

  • Select your root Item(s). This is going to be the Sitecore Path where the Index should start it’s indexing from. You can list multiple root item paths if there are multiple locations within your Sitecore Content tree that content should be searchable from. By default, the module will index every page under /sitecore/content/home/.
  • Read Only Solr Password and Admin Solr Password: These are the “Read-Only API Credentials” and the “Read-Write Search API Credentials” from the Search API tab of the Studio > Navigation Menu > Search App > Settings > Apps Settings screen. You’ll have to scroll down to the bottom of the screen to find them. The User ID is set by the system, but you can set the password (both Read only and Read Write need to be set).
  • (Optional) You are given an opportunity to enter the Hosted Search Page Password. At this point, unless you know what this password is, and you have previously configured it, we can safely skip this field.

  • Reset Index When Rebuilding: Check this field if you want SearchStax to completely clear your index right before rebuilding it. Keep in mind that doing so your index will be empty during the rebuilding process, which might take minutes, and that your search page will return no results during this period of time.

  • Press the Save button.

After pressing Save you’ll be prompted a confirmation box. Press confirm to allow Sitecore to apply the appropriate configuration files.

Validate Index Creation and Populate Managed Schema

Once you have installed and configured the Sitecore module, you must run a Populate Schema operation on this new Solr collection to update its schema with the one used by Sitecore. You can find more details about this at https://doc.sitecore.com/xp/en/developers/90/platform-administration-and-architecture/solr-managed-schemas.html. This is a common operation that must be executed on every Solr index used in Sitecore and is very easy to perform. Open your Sitecore admin page and click on Control Panel -> Populate Solr Managed Schema.

Select your previously configured core name and then click on Populate.

Once this operation is completed, you should see a success message like this:

Now go back to the Control Panel and click on Indexing Manager. When it opens, select your previously configure core name and click on Rebuild.

Usually, it should only take a few minutes but keep in mind that the time this operation will take is proportional to the number of items you have in your Sitecore. 

Once this operation is completed you should see a success message like this:

This means that your schema is updated and your SearchStax index is ready to receive new indexed items and search queries.

Reload the Studio App’s Schema from within Studio Dashboard

At this point, we navigate away from Sitecore and login to your SearchStax Studio Dashboard.

(You can search SearchStax Studio directly by going to www.searchstudio.com or click on Search Management from within Sitecore as shown below.)

  1. From within Studio, select the appropriate app that you are in the process of setting up.  Navigation Menu > Search App > Apps Settings.
  2. Click on the Search API tab at the top, then scroll to the bottom of the screen, and press the Reload Schema button.

Rebuild the Index

Head back to the Sitecore Control Panel and select on Indexing Manager.

Select the appropriate index and then click the Rebuild button.

Create a Search Page

  • Configure Result Fields in SearchStax Studio
    • Go to Studio > Navigation Menu > Search App > Search > Results Configuration
    • Select all fields that you would like to be displayed in Result Items. You can map some of the fields to the Result Cards to show them in a special way. Make sure you have at least one field set up.
    • Click on Publish to publish the Results Configuration.
  • Configure Relevance Model for SearchStax Studio
    • Go to Studio > Navigation Menu > Search App > Search > Relevance Modeling
    • Click on “Create a Model” and create a new model named “Default”. If one already exists, you can click on it to edit it.
    • Check “Set as Default” for this model
    • From the Search Fields, select one or more fields that you would like to search on. At least one field should be selected.
    • Click on Publish to publish the Relevance Model.

The Sitecore Module comes with a plug-and-play search page template that you can use to create your search page in a few minutes. Use the /sitecore/templates/Feature/SearchStax/SearchPage/SearchStaxPage template to create it.

And then use the SearchStax Index field to select which index must be used by this search page when performing queries:

You just need to publish it to start testing your new search experience:

Computed Fields

The Sitecore Module uses a few computed fields out-of-the-box. These fields improve the search experience of your initial search page, but they can be replaced or removed as your project matures. The module’s computed fields are described in the following sections.

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 title of the result item, based on the Sitecore item DisplayName property. If that is empty, the returned string is its Name property value.

This field is not required by the module to make it work properly. However, it is the field that the module uses as the result template title. If you decide to remove or change, do not forget to change the studio config connector.fields.title property on the /Views/SearchStaxPage/Index.cshtml.

ResultURL

This field contains the result URL. It leverages the native Sitecore MediaManager.GetMediaUrl method for media items to get the item URL. When the item is not a media item, this fields starts by defining the current website context. It uses the indexed item Paths.FullPath property and tries to find a website definition which has the same Database property value and has a RootPath which is a parent item from the current one. Once it finds the current website context, it then leverages the native Sitecore LinkManager.GetItemUrl method to get the item URL.

This field is not required by the module to make it work properly. However, it is the field that is used as the result template clickable URL. If you decide to remove it or change, do not forget to change the studio config connector.fields.url property on the /Views/SearchStaxPage/Index.cshtml.

RenderedContent

This field contains a string value that improves the search relevance of the website. It indexes not only the current item text fields, but also the text fields from every data source present on any given indexed page rendering, except the renderings on the <renderedContentFieldExcludedRenderings> configuration list.

In order to add new rendering ids to this list and remove them from being indexed by this computed field, please edit the < renderedContentFieldExcludedRenderings > node children’s values on the App_Config/Modules/SearchStax/SearchStax.Connector.Provider.config file. This field is not required by the module to make it work properly. You can remove it from your index if you wish.

Adding a Custom Computed Field

What if you would like to add a custom computed field to the configuration? After the SearchStax index has been created, find the index within [site]/App_Config/Modules/SearchStax/SearchStax.Connector.Provider.config, where [site] is the folder of your inetpub/wwwroot/site. In the <fields hint=”raw:AddComputedIndexField”> section, add an entry for the CustomComputedIndexField:

<field fieldName="CustomComputedIndexFieldName" returnType="string">
     YourNameSpace.CustomComputedIndexField,YourNameSpace
</field>

Bear in mind that computed index fields are expensive and place a load on the CPU. One should minimize their use.

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Sitecore Module 2.0.0 appeared first on SearchStax Docs.

]]>
Upgrade to Module 2.0.0 https://www.searchstax.com/docs/searchstudio/upgrade-sitecore-connector-2/ Fri, 29 Jul 2022 17:32:54 +0000 https://www.searchstax.com/docs/?post_type=searchstudio&p=11617 Upgrading Sitecore Module from 1.7.1 to 2.0.0 How to upgrade from Sitecore Module v1.7.1 to v2.0.0 SearchStax released the latest version of its SearchStax for Sitecore package which contains several new features… Continue reading Upgrade to Module 2.0.0

The post Upgrade to Module 2.0.0 appeared first on SearchStax Docs.

]]>
Upgrading Sitecore Module from 1.7.1 to 2.0.0

How to upgrade from Sitecore Module v1.7.1 to v2.0.0

SearchStax released the latest version of its SearchStax for Sitecore package which contains several new features and bug fixes. If you are still using SearchStax for Sitecore 1.7.1 you should think about upgrading it in order to leverage all this. This document shows how you can upgrade from a previous version to 2.0.0.

Start by downloading SearchStax for Sitecore 2.0.0 version from here.

There are a few changes in the structure of the SearchStax configuration files between versions 1.7.1 and 2.0.0, so please move this file to a separate folder where it won’t be overwritten:

  • \App_Config\Modules\SearchStax\SearchStax.Connector.Provider.config

Then delete all the config files in the following folder:

  • \App_Config\Modules\SearchStax

Open your Sitecore instance and install the SearchStax for Sitecore 2.0.0 package using the Sitecore Installation Wizard.

Make sure you select “Yes to all” when asked to overwrite files:

Make sure you select “Apply to all” and “Overwrite” to overwrite all the items already in Sitecore.

Once the installation is finished, open the configuration page, and recreate the SearchStax indexes you need to be part of your Sitecore instance.

If you have custom attributes that were previously added to your indexes, such as computed fields, open the following file using a text-editor program:

  • \App_Config\Modules\SearchStax\SearchStax.Connector.Provider.config

And replace its <indexes> node by the one present in the SearchStax.Connector.Provider.config file you backed up at the beginning of this upgrade process. This will bring all our custom attributes back to the Sitecore instance.

Open every search page using /sitecore/templates/Feature/SearchStax/SearchPage/SearchStaxPage template and use the SearchStax Index field to select which previously created index this given page should use when searching for results.

Rebuild all your SearchStax indexes using the Sitecore index manager.

Publish your website and you should now be able to use the search page without any issues.

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Upgrade to Module 2.0.0 appeared first on SearchStax Docs.

]]>
Mapping Sitecore Fields https://www.searchstax.com/docs/searchstudio/mapping-sitecore-fields/ Wed, 23 Nov 2022 14:36:37 +0000 https://www.searchstax.com/docs/?post_type=searchstudio&p=13723 Mapping Sitecore Fields to SearchStax Studio Once your data is connected to Studio, you will need to map fields from Sitecore to Studio to see search results. This is accomplished… Continue reading Mapping Sitecore Fields

The post Mapping Sitecore Fields appeared first on SearchStax Docs.

]]>
Mapping Sitecore Fields to SearchStax Studio

Once your data is connected to Studio, you will need to map fields from Sitecore to Studio to see search results. This is accomplished in the Results and Display section where you can assign Sitecore Fields to Mapped Fields.

To simplify things, we created a Results Card with pre-built Mapped Fields. Out of the box, Studio supports six mapped fields: Ribbon, Title, Paths, Date, Description, and URL. You can add Fields without a mapping as well and they will appended to the end of the Results Card.

Below is a table of common Sitecore Fields that map nicely to Studio and are usually found in all Sitecore instances.

Studio Mapping Sitecore Field(s) Description
Title resulttitle_t, itemdisplayname_s, search_title_t, itemtitle_t, title_s Bolded, large text that says about the document is about.
Ribbon Sitenamelabel_s, asset_type_s, _templatename, contenttype_sm Identifies what type of document it is (PDF, blog, web page?)
Paths Domainpageurl_t, _fullpath Shows the URL path
Date Itemupdatedate_tdt, _updated, date_tdt Date document was created
Description Renderedcontent_t, metadescription_t_en, search_description_t Brief description
URL Domainpageurl_t, resulturl_s Hidden field that shows where to go on a click

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Mapping Sitecore Fields appeared first on SearchStax Docs.

]]>
Sitecore Module FAQ https://www.searchstax.com/docs/searchstudio/searchstax-studio-sitecore-module-faq/ Wed, 02 Feb 2022 17:55:15 +0000 https://www.searchstax.com/docs/?post_type=searchstudio&p=10774 Sitecore Module FAQ SearchStax has compiled the following list of “frequent questions” about the SearchStax Studio Sitecore Module. Index rebuild operation is failing after a few seconds. How to fix… Continue reading Sitecore Module FAQ

The post Sitecore Module FAQ appeared first on SearchStax Docs.

]]>
Sitecore Module FAQ

SearchStax has compiled the following list of “frequent questions” about the SearchStax Studio Sitecore Module.

Index rebuild operation is failing after a few seconds. How to fix it?

This may be happening due to multiple reasons. You can follow these tips to help you troubleshoot this issue:

  1. Always check the Sitecore logs for more information. Sometimes the error message will point you to exactly where the error is.
  2. Temporarily disable all the custom computed fields and try again. If it works, there is a issue that must be fixed in one of your computed fields.
  3. Make sure that the crawler root item exists in the target database (usually web).
  4. Confirm that there are no firewall rules blocking your Sitecore instance from sending requests to SearchStax cloud endpoints.

Index rebuild operation in Sitecore is taking too long. What can I do to make it faster?

Indexing items in Sitecore is a heavy operation by definition, so the first thing you can do is make sure your crawlers have the most specific root item possible. For example, instead of indexing /sitecore/content/site, change it to /sitecore/content/site/home, since all we want to index are pages.

Another thing that might help with indexing performance is limiting the number and complexity of computed fields. Remember, each computed field is executed one time for every item you want to index.

I want to have the page rendering data sources as searchable content. How can I index them?

First, you don’t need to index those items individually. The package comes with a computed field called RenderedContent that indexes them as part of the page itself. All you have to do is to configure it properly. You can find more information at https://www.searchstax.com/docs/searchstudio/sitecore-module/#computed.

I have an exception message after adding a SXA rendering to my Sitecore page. How can I fix this?

SearchStax for Sitecore SXA search page requires a datasource item in order to work properly. Make sure you create it first and then add it in a proper placeholder. More information on https://www.searchstax.com/docs/searchstudio/searchstudio-sitecore-sxa.

When doing A/B Testing with Sitecore, multiple versions of the page are being published and available with Search. How can I fix this?

When doing A/B testing, Sitecore publishes multiple versions of the page which are available to different users. To exclude multiple versions from the search results, you can set a Global Exclusion filter to get only the latest version of the page in the search result. This is captured by the field ‘_latestversion‘ and as can be set as shown below.

Simply add this to the Global Filters and publish the model to exclude the duplicates from search.

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Sitecore Module FAQ appeared first on SearchStax Docs.

]]>
Custom Search Page https://www.searchstax.com/docs/searchstudio/custom-mvc-search-page/ Wed, 27 Oct 2021 16:45:28 +0000 https://www.searchstax.com/docs/?post_type=searchstudio&p=9926 How to Create a SearchStax Custom Search Page In a real-world project, customers using the SearchStax Sitecore Module to leverage all the SearchStudio capabilities will end up needing to customize… Continue reading Custom Search Page

The post Custom Search Page appeared first on SearchStax Docs.

]]>
How to Create a SearchStax Custom Search Page

In a real-world project, customers using the SearchStax Sitecore Module to leverage all the SearchStudio capabilities will end up needing to customize the Sitecore search page in order to give it the same look and feel of the rest of the website, or to extend some missing feature. Instead of editing the SearchStudio search page component, the best way to do that is by creating a custom search page.

Do not modify SearchStax components!

SearchStax strongly recommends that code customization should not be performed on the original SearchStax Sitecore components. Any change applied to an out-of-the-box component might be overwritten during an upgrade process. To avoid this situation, you should create a new component using the original search page as starting point and then apply any customization needed.

This tutorial is a step by step that shows how to create a full custom component.

Prerequisites

This article assumes that you already have a C# solution with an MVC project.

Assembly References

Start by adding project references to those two SearchStax assemblies. They are part of your SearchStax for Sitecore package:

  • SearchStax.Foundation.Core.dll
  • SearchStax.Feature.SearchPage.dll

Controller

Add the below class to your MVC project and give it a meaningful name following the MVC pattern, such as CustomSearchStaxController. This class will have an Index() action method that will be used by a Sitecore controller rendering later. This method loads everything required by a SearchStax view class to work properly and passes it to the view using the SearchPageModel object.

using SearchStax.Feature.SearchPage.Services;
using System.Web.Mvc;
using System.IO;
using System;
 
namespace SearchStax.Feature.SearchPage.Controllers
{
    public class CustomSearchStaxController : Controller
    {
        private readonly ISearchPageConfigurationFetcher _searchPageConfigurationFetcher;
 
        public CustomSearchStaxController()
            : this(new SearchPageConfigurationFetcher())
        { }

        public CustomSearchStaxController(ISearchPageConfigurationFetcher searchPageConfigurationFetcher)
        {
            this._searchPageConfigurationFetcher = searchPageConfigurationFetcher;
        }
 
        public ActionResult Index()
        {
            var searchModel = this._searchPageConfigurationFetcher.GetSearchPageConfiguration();
 
            string viewName = "Index";
            var viewFilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Views\\SearchStaxPage\\" + searchModel.SearchStaxConfiguration.IndexCoreName + ".cshtml");
            if (System.IO.File.Exists(viewFilePath))
            {
                viewName = searchModel.SearchStaxConfiguration.IndexCoreName;
            }
 
            return View(viewName, searchModel);
        }
    }
}


View

Create a new view file based on the already existing \Views\SearchStaxPage\Index.cshtml file found on your Sitecore instance. Name this file as Index.cshtml and add it to the project folder \Views\[CustomSearchStax]. Make sure you change the [CustomSearchStax] by your controller prefix.

This is the moment when you can apply some custom styling with CSS manipulations, or even more structural changes to the search page, accordingly to what is required by your project design.

Rendering

In Sitecore, create a controller rendering under a custom folder on /sitecore/layout/Renderings. Configure the Controller field to point to the previously created controller, and the Controller Action field to its Index method. Here is an example:

Search Page

Once you have everything configured in the rendering, you can add the new rendering to a page item and validate that the customizations you previously applied are there.

You can even compare this search page with the standard one that uses the standard /sitecore/layout/Renderings/Feature/SearchStax/SearchPage/SearchStaxPageRendering to see the customizations:

Summary

  1. Chose an MVC project or create a new one.
    1. Add a reference to SearchStax.Foundation.Core.dll
    2. Add a reference to SearchStax.Feature.SearchPage.dll
  2. Create a new controller called CustomSearchStaxController
    1. Copy and paste the controller class from the example
  3. Create a new view based on \Views\SearchStaxPage\Index.cshtml and add it to \Views\ CustomSearchStax\Index.cshtml
  4. Create a new rendering pointing to the method in the new controller
  5. Add the rendering to a search page and validate the customizations

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Custom Search Page appeared first on SearchStax Docs.

]]>
Modify Configs https://www.searchstax.com/docs/searchstudio/modify-configs/ Tue, 10 Aug 2021 17:54:46 +0000 https://www.searchstax.com/docs/?post_type=site_search&p=9464 Modify Sitecore Module Configuration The Sitecore Module connects your Sitecore CMS to SearchStax SearchStudio for a customized search experience. The Module is helpful and convenient up to the moment when… Continue reading Modify Configs

The post Modify Configs appeared first on SearchStax Docs.

]]>
Modify Sitecore Module Configuration

The Sitecore Module connects your Sitecore CMS to SearchStax SearchStudio for a customized search experience. The Module is helpful and convenient up to the moment when you decide to revise one or more settings. At that point, you’ll need to edit a configuration file.

A typical scenario occurs when you decide to connect your Sitecore instance to a different SearchStudio App. This entails changes to Solr endpoints as well as to the user names and passwords of your Admin and Read-Only Solr users. Spelling correction or auto-suggest endpoints might or might not be included at your preference.

The file to edit is \App_Config\Modules\SearchStax:

<configuration xmlns:patch=http://www.sitecore.net/xmlconfig/>
  <sitecore>
    <searchstax>
      <configs>
        <cloud type="SearchStax.Foundation.Core.Configuration.SearchStaxConfiguration, SearchStax.Foundation.Core" coreIndexName="searchstudio-for-sitecore-test">
          <RootItem>/sitecore/content/tenant/site/home</RootItem>
          <SearchEndpoint>https://ss123456-bhfq2ixl-us-east-1-aws.searchstax.com/solr/searchstudio-for-sitecore-test/emselect</SearchEndpoint>
          <SuggestEndpoint>https://ss123456-bhfq2ixl-us-east-1-aws.searchstax.com/solr/searchstudio-for-sitecore-test/emsuggest</SuggestEndpoint>
          <AuthenticationBasicToken>YXBwNzAtYXBpOkFycmliYSEyMw==</AuthenticationBasicToken>
          <AdminAuthenticationBasicToken>YXBwNzAtYWRtaW46S29uYWJvcyEyMw==</AdminAuthenticationBasicToken>
          <SolrUsername>app70-api</SolrUsername>
          <SolrPassword>Arriba!23</SolrPassword>
          <AdminSolrUsername>app70-admin</AdminSolrUsername>
          <AdminSolrPassword>Arriba!23 </AdminSolrPassword>
          <AnalyticsApiKey>cBVKGLpV3bhcv8vu PBdP0hC5FtxcGnhwOvkK5h6Berw</AnalyticsApiKey>
          <IndexCoreName>searchstudio-for-sitecore-test</IndexCoreName>
        </cloud>
      </configs>
    </searchstax>
  </sitecore>
</configuration>

The meaning of most of these settings should be self-evident from the parameters required by the Sitecore Module. The exceptions would be the AuthenticationBasicToken and the AdminAuthenticationBasicToken.

  • AuthenticationBasicToken: The authentication token for the Read-Only Solr user.
  • AdminAuthenticationBasicToken: The authentication token for the Admin Solr user.

You did not have to provide these values when setting up the Sitecore Module, but any changes to the Read-Only or Admin user credentials will force you to generate new tokens and enter them here along with the new credentials.

Fortunately, there are web sites that generate authentication tokens based on username and password combinations. One of them is the Basic Authentication Header Generator:

Just copy the token from the screen and paste it into the config file.

After editing and saving the config file, you’ll have to restart Sitecore to see the changes take effect.

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Modify Configs appeared first on SearchStax Docs.

]]>
Field for Faceting/Sorting in Sitecore https://www.searchstax.com/docs/searchstudio/field-faceting-sorting/ Tue, 08 Aug 2023 17:42:46 +0000 https://www.searchstax.com/docs/?post_type=searchstudio&p=15943 How to Create a Field for Faceting or Sorting in SearchStudio for Sitecore In this guide you will learn how to create a field to facet or sort on in… Continue reading Field for Faceting/Sorting in Sitecore

The post Field for Faceting/Sorting in Sitecore appeared first on SearchStax Docs.

]]>
How to Create a Field for Faceting or Sorting in SearchStudio for Sitecore

In this guide you will learn how to create a field to facet or sort on in Studio.

You may have already tried to create a facet or sort in Studio, but didn’t get the results you were expecting. This is because fields of type text_general are tokenized. The data in them are broken up into tokens making any Faceting/Sorting behave unpredictably.

As an example, if you want to facet on the field city_t, you would expect the value “Los Angeles” to appear as a facet value. However, since city_t is a text_general type, “Los Angeles” actually becomes “Los” and “Angeles”. Your facet now has values for “Los” and “Angeles” which is not the expectation.

In this example, the solution is to change city_t to a “string type” field. String types are not tokenized. The data remains as in. So, the facet value would be “Los Angeles” as expected.

Now, let’s update your text_general field to a string type in Sitecore.

Change Field Type in Sitecore

  1. Begin by creating a new XML file named Patch.config in the app_config/include directory. Paste the provided XML configuration into this file. The configuration will modify the return types of specific field types in Sitecore. This is how the configuration looks:
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:role="http://www.sitecore.net/xmlconfig/role/" xmlns:search="http://www.sitecore.net/xmlconfig/search/">
    <sitecore>
        <contentSearch search:require="solr">
            <indexConfigurations>
                <defaultSolrIndexConfiguration type="Sitecore.ContentSearch.SolrProvider.SolrIndexConfiguration, Sitecore.ContentSearch.SolrProvider">
                    <fieldMap type="Sitecore.ContentSearch.SolrProvider.SolrFieldMap, Sitecore.ContentSearch.SolrProvider">
                        <fieldTypes hint="raw:AddFieldByFieldTypeName">
                            <fieldType fieldTypeName="html|rich text|single-line text|multi-line text|text|memo|image|reference" returnType="text">
                                <patch:attribute name="fieldTypeName">html|rich text|multi-line text|text|memo|image</patch:attribute>
                            </fieldType>
                            <fieldType fieldTypeName="single-line text|reference" returnType="string"/>
                        </fieldTypes>
                    </fieldMap>
                </defaultSolrIndexConfiguration>
            </indexConfigurations>
        </contentSearch>
    </sitecore>
</configuration>

  1. Save the Patch.config file.
  2. The next step is to modify the Sitecore template. Start by opening Sitecore’s Content Editor.
  3. Navigate to the template that contains the field you want to change.
  1. Find the field you want to change, click on it to open its details.
  2. In the field details, look for the Type field, click on it, and change it from Text General to Single-Line Text. This changes the field type to a string type, which will not be tokenized.

Update the Schema

  1. In the Sitecore desktop interface, select the Sitecore button at the bottom left (or the Sitecore logo at the top left if you’re using the newer interface).
  2. Select Control Panel.
  3. In the Control Panel, under the Indexing section, select Populate Solr Managed Schema.
  1. Select the Index for which you’ve made edits to and click Populate

Reindex the Data

  1. In the Sitecore Content Editor, go to the Control Panel.
  2. Under the Indexing section, select Index Manager.
  3. In the Index Manager screen, select the relevant indexes and click on Rebuild.
  1. Wait until the process completes. This will take some time, depending on the amount of content in the index.

Create a Facet/Sort in Studio

  1. Login to the Studio dashboard at searchstudio.searchstax.com.
  2. Navigate to Settings > Search API. At the bottom of the page click Reload Schema.
  1. You are now ready to create a new Facet/Sort! Navigate to Results Configuration and then to either Faceting or Sorting.
  2. In the Field dropdown, select the new field. It will have the same name when it was a text_general , but likely have _s appended. For example, city_s.
  1. Click on Publish to save the change. Now, your facet/sort should work as expected. Navigate to Search Preview to run a search and see!

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Field for Faceting/Sorting in Sitecore appeared first on SearchStax Docs.

]]>
Multi-Site Search https://www.searchstax.com/docs/searchstudio/multi-site-searching/ Wed, 15 Sep 2021 14:33:22 +0000 https://www.searchstax.com/docs/?post_type=site_search&p=9655 Using Multi-Site Sitecore with SearchStudio A single Sitecore instance can be used to manage multiple websites. This page describes how to set up a SearchStax SearchStudio project on each Sitecore… Continue reading Multi-Site Search

The post Multi-Site Search appeared first on SearchStax Docs.

]]>
Using Multi-Site Sitecore with SearchStudio

A single Sitecore instance can be used to manage multiple websites. This page describes how to set up a SearchStax SearchStudio project on each Sitecore website individually.

This is actually very simple:

  • You need a separate SearchStudio App for each of the individual websites.
  • Follow the instructions in the Sitecore Module page to connect a Sitecore website to a SearchStudio App.
  • To create a SearchStudio project for a second site in the same Sitecore instance, simply follow the instructions again for the second site.

The critical point is that each site in Sitecore must have its own SearchStudio App. That way, each site gets it own search page, and data from the independent sites does not mix.

Full-length instructions may be found at Implement Multi-Site Search on Sitecore with SearchStudio.

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Multi-Site Search appeared first on SearchStax Docs.

]]>
Multi-Root Crawling https://www.searchstax.com/docs/searchstudio/multi-root-crawling/ Mon, 09 Aug 2021 17:19:42 +0000 https://www.searchstax.com/docs/?post_type=site_search&p=9454 SearchStax SearchStudio for Sitecore – How to configure multiple index crawler roots In certain scenarios, you might want to index multiple root items on your Sitecore content tree. This a… Continue reading Multi-Root Crawling

The post Multi-Root Crawling appeared first on SearchStax Docs.

]]>
SearchStax SearchStudio for Sitecore – How to configure multiple index crawler roots

In certain scenarios, you might want to index multiple root items on your Sitecore content tree. This a common request in Sitecore, and SearchStax SearchStudio for Sitecore supports it.

Let’s assume that you have the following example and wants to index everything under Home/About and everything under Home/Bios, but not the other items.

Open the /App_Config/Modules/SearchStax/SearchStax.Connector.Provider.config configuration file and locate your index. You will have a <locations> node which contains a list of <crawler> nodes as children.

Start by changing the <Root> of the already existing crawler if needed. Then, copy and paste the entire <crawler> node and change the <Root> value for this new one too. You might end up with something like this:

Like any other configuration change in Sitecore, this is going to restart your application. Wait until Sitecore is responsive again and open the Indexing Manager in order to rebuild your index:

Once the rebuild is done, you can now open your search page and confirm that only items under those two roots are being indexed:

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Multi-Root Crawling appeared first on SearchStax Docs.

]]>
Sitecore Module with Docker https://www.searchstax.com/docs/searchstudio/searchstax-studio-sitecore-module-with-docker/ Wed, 04 May 2022 23:43:20 +0000 https://www.searchstax.com/docs/?post_type=searchstudio&p=11412 Sitecore Module with Docker The adoption of containers with Sitecore for both development and production purposes has been growing rapidly over the past few years, and is now a fully… Continue reading Sitecore Module with Docker

The post Sitecore Module with Docker appeared first on SearchStax Docs.

]]>
Sitecore Module with Docker

The adoption of containers with Sitecore for both development and production purposes has been growing rapidly over the past few years, and is now a fully supported option even with mainstream support from Sitecore. There are a number of benefits of using containers, more information is available in the documentation.

When using containers, the installation process for modules requires a different approach. The SearchStax for Sitecore Docker images have been built using the recommended format for Sitecore Docker modules, and follow the same structure as other asset type images (e.g. SXA, SPE).

You can find the details of the images in Docker Hub: https://hub.docker.com/u/searchstaxinc

Adding the SearchStax image layer

The module is layered in the same way as all other Sitecore modules and asset images. You must set the environment variables to match your SearchStax instance, update your Docker build files to layer in the module and configure the Docker compose files to utilize these.

Populate the environment variables

In your .env file set the following unassigned variables:

SEARCHSTAX_VERSION=2.2.0-10.2-ltsc2019
SEARCHSTAX_SXA_VERSION=2.2.0-ltsc2019
SEARCHSTAX_ROOT_ITEM=
SEARCHSTAX_INDEX_CORE_NAME=
SEARCHSTAX_DATABASE=
SEARCHSTAX_SEARCHSTUDIOUSERNAME=
SEARCHSTAX_SEARCHSTUDIOPASSWORD=

Please update all the required values for your configuration for your SearchStax instance.

Update your Dockerfiles

You can read more about the Sitecore runtime Dockerfiles in the Sitecore documentation. The SearchStax for Sitecore module follows the same set of basic instructions.

For the CM container modify the Dockerfile to match the following, the new lines have been highlighted (<–).

If you are not using SXA then you do not need to add the SXA layers below.

# escape=`
 
ARG BASE_IMAGE
ARG SXA_IMAGE
ARG SPE_IMAGE
ARG TOOLING_IMAGE
ARG SEARCHSTAX_IMAGE       <--
ARG SEARCHSTAX_SXA_IMAGE   <--
 
FROM ${TOOLING_IMAGE} as tooling
FROM ${SPE_IMAGE} as spe
FROM ${SXA_IMAGE} as sxa
FROM ${SEARCHSTAX_IMAGE} as searchstax          <--
FROM ${SEARCHSTAX_SXA_IMAGE} as searchstaxsxa   <--
FROM ${BASE_IMAGE}
 
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
 
# Copy development tools and entrypoint
COPY --from=tooling \tools\ \tools\
 
WORKDIR C:\inetpub\wwwroot
 
# Add SPE module
COPY --from=spe \module\cm\content .\
 
# Add SXA module
COPY --from=sxa \module\cm\content .\
COPY --from=sxa \module\tools \module\tools
RUN C:\module\tools\Initialize-Content.ps1 -TargetPath .\; `
    Remove-Item -Path C:\module -Recurse -Force;
 
# Add SearchStax module
COPY --from=searchstax \module\cm\content .\      <--
COPY --from=searchstaxsxa \module\cm\content .\   <--

For Sitecore 10.1 and earlier, for the mssql container modify the Dockerfile to match the following, the new lines have been highlighted (<--)

# escape=`
 
ARG BASE_IMAGE
ARG SXA_IMAGE
ARG TOOLING_IMAGE
ARG SEARCHSTAX_IMAGE       <--
ARG SEARCHSTAX_SXA_IMAGE   <--
 
FROM ${TOOLING_IMAGE} as tooling
FROM ${SXA_IMAGE} as sxa
FROM ${SEARCHSTAX_IMAGE} as searchstax          <--
FROM ${SEARCHSTAX_SXA_IMAGE} as searchstaxsxa   <--
FROM ${BASE_IMAGE}
 
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
 
# Copy development tools and entrypoint
COPY --from=tooling \tools\ \tools\
 
WORKDIR C:\inetpub\wwwroot
 
# Add SXA module
COPY --from=sxa \module\cm\content .\
COPY --from=sxa \module\tools \module\tools
RUN C:\module\tools\Initialize-Content.ps1 -TargetPath .\; `
    Remove-Item -Path C:\module -Recurse -Force;
 
# Add SearchStax module
COPY --from=searchstax \module\cd\content .\      <--
COPY --from=searchstaxsxa \module\cd\content .\   <--
For the mssql container modify the Dockerfile to match the following, the new lines have been highlighted (<--)
# escape=`
 
ARG BASE_IMAGE
ARG SXA_IMAGE
ARG SPE_IMAGE
ARG SEARCHSTAX_IMAGE       <--
ARG SEARCHSTAX_SXA_IMAGE   <--
 
FROM ${SPE_IMAGE} as spe
FROM ${SXA_IMAGE} as sxa
FROM ${SEARCHSTAX_IMAGE} as searchstax          <--
FROM ${SEARCHSTAX_SXA_IMAGE} as searchstaxsxa   <--
FROM ${BASE_IMAGE}
 
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
 
# Add SPE module
COPY --from=spe \module\db \spe_data
RUN C:\DeployDatabases.ps1 -ResourcesDirectory C:\spe_data; `
    Remove-Item -Path C:\spe_data -Recurse -Force;
 
# Add SXA module
COPY --from=sxa \module\db \sxa_data
RUN C:\DeployDatabases.ps1 -ResourcesDirectory C:\sxa_data; `
    Remove-Item -Path C:\sxa_data -Recurse -Force;
 
# Add SearchStax module                                                <--
COPY --from=searchstax \module\db \searchstax_data                     <--
RUN C:\DeployDatabases.ps1 -ResourcesDirectory C:\searchstax_data; `   <--
    Remove-Item -Path C:\searchstax_data -Recurse -Force;              <--
 
# Add SearchStax SXA module                                               <--
COPY --from=searchstaxsxa \module\db \searchstaxsxa_data                  <--
RUN C:\DeployDatabases.ps1 -ResourcesDirectory C:\searchstaxsxa_data; `   <--
    Remove-Item -Path C:\searchstaxsxa_data -Recurse -Force;              <--

For Sitecore 10.2, you should instead update the mssql-init container. The files only need to be copied to the resources directory, the PowerShell deploy script does not need to be run:

<pre class="wp-block-syntaxhighlighter-code"># Add SearchStax module                                                <--
COPY --from=searchstax c:\module\db  C:\resources\searchstax           <--
# Add SearchStax SXA module                                               <--
COPY --from=searchstax c:\module\db  C:\resources\searchstaxsxa           <--
</pre>

Docker Compose File

In your docker-compose.override.yml update the mssql container args to include:

SEARCHSTAX_IMAGE: searchstaxinc/searchstax-for-sitecore:${SEARCHSTAX_VERSION}
SEARCHSTAX_SXA_IMAGE: searchstaxinc/searchstax-for-sitecore-sxa:${SEARCHSTAX_SXA_VERSION}

Update the cd and cm containers args to include:

SEARCHSTAX_IMAGE: searchstaxinc/searchstax-for-sitecore:${SEARCHSTAX_VERSION}
SEARCHSTAX_SXA_IMAGE: searchstaxinc/searchstax-for-sitecore-sxa:${SEARCHSTAX_SXA_VERSION}

and the environment section to include:

SearchStax_RootItem: ${SEARCHSTAX_ROOT_ITEM}
SearchStax_IndexCoreName: ${SEARCHSTAX_INDEX_CORE_NAME}
SearchStax_Database: ${SEARCHSTAX_DATABASE}
SearchStax_SearchStudioUsername: ${SEARCHSTAX_SEARCHSTUDIOUSERNAME}
SearchStax_SearchStudioPassword: ${SEARCHSTAX_SEARCHSTUDIOPASSWORD}

Disabling the health check

For local development, the default Sitecore health check needs to be disabled to make sure that the Search Stax index doesn’t fail the health check. This is recommended anyway to getting meaningful messages due to any startup errors.

traefik:
    depends_on:
      cm:
        condition: service_started
 
  cm:
    healthcheck:
      test: ["CMD", "powershell", "-command", "exit 0"]

Upgrading to 2.0.0 from previous versions

If you are upgrading your Docker/Container instance from a previous version then you will need to reinitialize the databases, which will cause the latest updates to the Sitecore Items to correctly be installed.

The Sitecore containers scripts do not reinitialize or update databases when those database files already exist, so you must pass in the override parameter as an environment variable to the mssql-init container, which will force install the module updates to the database.

mssql-init:
    environment:
      DATABASES_TO_DEPLOY: searchstax

This process only needs to be run once.

Questions?

Do not hesitate to contact the SearchStax Support Desk.

The post Sitecore Module with Docker appeared first on SearchStax Docs.

]]>