CRM and CX Blogs by SAP
Stay up-to-date on the latest developments and product news about intelligent customer experience and CRM technologies through blog posts from SAP experts.
cancel
Showing results for 
Search instead for 
Did you mean: 
ManimozhiRathinam
Product and Topic Expert
Product and Topic Expert
1,427

Conguration of Apache Solr


The SAP Commerce Cloud storefronts (Spartacus or accelerator) come with Apache Solr integrated by default. The Backoffice Product Content Management perspective also leverages Solr for returning products. Solr is an open source search platform built upon a Java library called Lucene. Adaptive Search not only integrates with Solr, but adds commerce features on top, such as Boost Rules, Promotion/Exclusions, and personalized, profile-based search configurations

How to enable solr ?


1.Log in to the Backoffice with the “admingroup” permission

2.Navigate to System > Search and Navigation > Facet Search Configurations

3.Open Solr Config from the list (e.g. Solr Config for Backoffice)

4.Click the   Index' icon to start the SolrIndexerOperationWizard

5.The Solr Indexer wizard appears. Select full as Operation values and click the START button to run the full indexing operation

Click  Enabling Solr Search for  more information about Apache Solr prerequisites and configuration steps

 Configure Solr Search


Solr Cloud allows you to configure a number of shards (how many nodes your data is broken up across) and how many replicas (how many times the data is repeated). The default is 1 shard (no breakup of data) and 1 replica (redundancy).

The image shows a sample infrastructure that is representative of a simple Solr Cloud configuration.

Load balancer is optional and true routing is done by the ZooKeeper ensemble

Solr Search ConfigurationView details about how to configure Solr Search

CX Works | Search and Navigation in SAP Commerce Cloud - Solr InfrastructureView more information about the Solr infrastructure

Configure Facets


Facets break up the search results into multiple categories, showing item counts for each of them.

To configure Facets:

  1. Navigate to System > Facet Search > Indexed Types

  2. Choose type e.g. apparelProduct

  3. On the Indexed Properties tab, choose to Edit Details from the row menu of the property you want to change facet settings for

  4. Go to the Facet Settings tab

  5. Set Facet option as True/False and provide additional settings as suitable


Facets View more information about Facet configuration

Enable Simple Search & Reference Editors Search


You can configure and use Solr features like auto-complete and ”Did You Mean?” for your storefront, as well as in Backoffice simple searches or reference editors.

To enable these features:

  1. Navigate to System > Facet Search > Indexed Types

  2. Pick the indexed type of your interest to display it in the Editor Area.

  3. Navigate to the Indexed Properties tab and choose a property you want to change settings for. From the row menu  of the inline editor, choose the Edit Details option.

  4. A pop-up window appears where you can define your preferences (pictured on the left).


Solr in Simple Search and Reference Editors Search View more information about Simple Search and Reference Editors Search

Index Field Types


Different field types have to be properly indexed in order to be searchable by Solr.

Examples: Dates, References, Collections, String Values, Numbers

Solr Index View more information about indexing field types

Indexing Functionality View more information about indexing in Commerce Cloud

Create and Configure Indexed Types View more information about creating  and configuring Indexed Type

Setup Solr Query


When you search for something on the storefront (e.g. shirt), behind the scenes that "shirt" term is translated into a Solr query which includes all the filtering, boost, and grouping values depending on what you've configured. This queries against the items in the respective Solr index and will return the relevant products and facets. If the expected results are not being returned, analyzing the Solr Search Query may help you understand why the data is not being returned.

Search Query View more information about Solr Search Query

Solr update Index


In Backoffice, an index updating strategy tracks and handles changes made by a user in the UI on items of any type included in Backoffice Solr index at runtime. The strategy doesn't track changes made by background jobs. The default strategy updates Solr index immediately, but you can alter this behavior with the appropriate spring configuration.

Update Solr Index View more information Solr update Index

Reverse Index Lookup for Query Optimization


The reverse index lookup allows you to optimize search query in Backoffice Product Content Management. You can change the default category-based search from expensive query and fast indexing to inexpensive query and demanding hot update, depending on your requirements.

Reverse Index Lookup for Query Optimization View more information on  Reverse Index Lookup for

Query Optimization

Search and Navigation Module


The Search and Navigation module functionality helps your customers to browse through the pages of your web stores and view the search results based on the facet settings. This can contribute to higher conversions, larger orders and more page views from people who use the search and navigation features.

The Search and Navigation module provides a range of features related to creating and managing search configurations. For example, you can create search query templates for your search configurations or manage

Search Query Templates


The search query templates introduce numerous customization options for getting improved search results for the customers. When creating the templates you can use various attributes, such as page size, grouping or sorting with respect to various channels or even storefront parts

Manage Search Configurations


Create and manage your search, indexing, and server configurations using the Backoffice Administration Cockpit

Search Query Templates









Features

  • Creating Templates- Create customized templates to accommodate your search configurations and improve performance.

  • Variants Grouping- Use the template settings to group the variants for a specific item, to save your customers' time.

  • Keyword Highlighting-Configure keyword highlighting for terms, to make them more visible on the storefront.

  • Configuring Suggested Terms-Create a template for suggested terms and customize it by adding sorting and restricting fields.


The following two types are supported out of the box: DEFAULT and SUGGESTIONS. The DEFAULT template is available on the template list right from the start for you to work with. In further sections you find information about what it holds and how it works.

  • Query Template Essential Information: Basic information about the template and main properties that apply to the entire template.

  • Query Properties: A list of query properties set for a given index type. For each query property, you can additionally define the free text query and facet settings.

  • Free Text Query: An advanced free text query builder.

  • Grouping: Settings that allow grouping of different variants of the same item.

  • Sorting: Settings that allow sorting of the items.



Search Query Templates View more information on Search Query Template

Manage Search Configurations











Team can define configurations for search, indexing and Solr server. Additionally they can define keywords, synonyms and stopwords for each configuration

Features

  • Creating Facet Search Configurations: Create facet search configurations including search and indexer configurations as well as details such as keywords, synonyms, stopwords and keyword redirects.

  • Defining and Configuring Indexed Types: Define the items you want to be indexed along with their properties and queries

  • Creating Ranges: Define the value range sets for given data types




Create Facet Search Configuration

Facet search config node in the explorer tree to create a new facet search configuration and customize it according to your needs.



1.Create a new facet search configuration and get to know advanced configuration options

2.Once you have created your new configuration, or you want to customize the existing one that was already defined, you can do the instructions provided in the following guides


Manage Search Configurations View more information on Search Configurations

CX Article Resources



















CX Works - Indexing

This article covers the fundamentals of indexing as well as provides recommendations on how to improve your indexing processes


CX Works - Understanding Solr Queries

If you haven't been able to get the right search results, you may want to take a deeper look at how the query process works to determine if you need to customize it further


CX Works – Solr Search Troubleshooting

Outlines common issues seen on projects, as well as how to potentially fix them.


CX Works – Solr Infrastrcuture

This article covers the various considerations when setting up the infrastructure to host Solr for your search and navigation requirements












Microlearning  - Solr Search Customization

This Session explains How to customize Solr Search Configuration in SAP Commerce Cloud


Microlearning  - Search & Navigation Webcast

Search & Navigation: Search for the relevant search result - SAP Commerce Cloud - Webcasts

Conclusion


Hopefully, the implementation team will find this article useful.


The article provides an overview of key configurations of Solr search, as well as links to additional information. It will serve as a complete guide for technical teams. Additionally, the CX Works articles on advanced topics are linked here. Please share your feedback in the comments section


The business value, features and configuration are summarized briefly in Ecommerce site solr search configuration and optimization strategies to improve conversions -PART I ...