Getting started with Sitecore Search

Sitecore Search is a powerful platform that you can integrate with to show predictive and personalized search experiences for your visitors. When you integrate with Search, you request data that you can use to build a search experience. This data could be a list of search results, facets, suggestions, and more. You also send visitor-driven events so that Search can generate personalized content and build analytics for your domain.

The complexity, flexibility, and development effort required to integrate depends on the method of integration that you choose.

Tip

To help get you started with Sitecore Search, you'll find video resources on the Discover Sitecore YouTube channel.

Integration methods

Sitecore Search provides three integration methods that you can choose from:

  • JavaScript SDK for React - integration involves adding SDK packages containing components and features to your project. Built specially for React applications, the SDK is the fastest way to integrate with Search and requires the least time and development effort.

  • JavaScript Data - can be used with vanilla JavaScript or in any JS framework. This is quick way to make search queries and receive responses from Search.

  • REST APIs - integration involves accessing endpoints that expose Search services. Configure the requests you want to send to Search. You'll also need to handle the responses and translate them into Search experiences.

Important

The JS SDK sets a cookie and includes the UUID when tracking events. Visitor information, UUID, is required to personalize search results.

Compared to the SDK, API integration usually takes longer and requires more development effort but provides complete flexibility.

Before integration

Before integration, an administrator configures your domain. They add attributes, index content, set up features, and configure widgets. They do all of this to prepare your domain for integration.

Before you integrate, at a minimum, make sure that you:

  • Can access Sitecore Search, a SaaS workbench where you can test requests and monitor events. You also use Sitecore Search to view attributes, features, and widgets configured for your domain and get details like their names and IDs.

  • Have access to API keys with required scopes. You need this for authentication if an administrator has not set up a subdomain.

  • Know where to show a search results widget and where to show a preview search widget. For example, you might want to show a full-page search on your company's home page but only a preview search for each vertical.

  • Know which features, like facets, sorting, and others, are required for each search experience and how these features are configured.

    Note

    While an administrator configures most features in Search, you might need to pass some settings at runtime.

  • Know what content needs to be searchable in each search experience. This is because not all indexed content might need to be available for all searches.

If you have trouble getting any of this information, contact your administrator.

During integration

During integration, you add Search-specific code to your application or website. This code sends requests to Search and receives responses from it.

For example, if a visitor enters a term in the search bar and clicks enter, you'll want to show matching results. To get these results, send a request to Search to get content for a search widget. Search looks within your domain's indexed content, applies its algorithm, and returns search results. You'll also need to send events based on visitor actions.

Do you have some feedback for us?

If you have suggestions for improving this article,