Understanding indexing
Types of search indexes
There are several types of search indexing within B2B Commerce:
Product | Quick Rebuild (Partial) and Full Rebuild, which includes a cache refresh of the Category Menu, Memory, Catalog and Content. |
Include Rebuild Dynamic Categories | Includes the rebuilding of dynamic categories along with the full product rebuild |
Include Rebuild Restriction Groups | Includes the rebuilding of the restriction groups along with the full product rebuild |
Content | Full Rebuild, which includes a cache refresh of the Category Menu, Memory, Catalog and Content.. |
Category | Full Rebuild, which includes a cache refresh of the Category Menu, Memory, Catalog and Content. |
The Indexing page, found in Marketing > Search > Indexing, provides access to the search indexes, their status, and the option (for Product only), to perform a Quick (Partial) Rebuild or Full Rebuild. A Quick Rebuild only updates product records that have changed at the base level, which does not include changes to the product's child items, such as category or attribute assignments; a Full Rebuild re-indexes all products, including their child items.
When to rebuild
Rebuilding an index is necessary whenever changes are made to a respective content area. In most circumstances, modifying product records requires the Product Search Index to be rebuilt. Changes to products or child objects (categories, attributes, and so on) display on the website correctly without a re-index because they are loaded even after a search. However, new changes are not searchable until indexed. When adding a product/removing a product from a category, or adding/removing an attribute, those type of relational changes do not appear until after reindexing. Ultimately, it depends on if the changes are made to searchable content, and if it is important for new search terms to work immediately.
Another consideration is the amount of time it takes to complete a rebuild. Depending on the number of products, running a Full Rebuild can take quite some time. Running a Quick Rebuild takes considerably less time to complete. Therefore, it is worth the effort to be strategic in flagging products whose child objects are modified frequently with the Schedule for Quick Indexing option. These products will then always be included in the Quick Rebuild, even if the base product is not updated.
Adding a product to the quick rebuild
To flag a product manually, go to the Product and select More Options and select Schedule for Quick Indexing.
Rebuilding status notifications
When rebuilding an index, the Admin Console provides rebuild status notifications. These notifications happen both on the Indexing page, as well as notifications that display below the Breadcrumb, which are visible across the Admin Console. These notifications allow users to continue working and not remain on the Indexing page. The Indexing page notifications provide the indexing status, as well as a link to the Index Job. The date line of the notification serves as the link to the related job history. The Job page provides important information about the job, which can be especially helpful for troubleshooting.
Examples of status notifications
This example shows both a notice that a rebuild has started and that one has completed. Both of these notifications were received while viewing the Indexing page.
These examples show notifications that a rebuild has either been completed or failed while viewing a non-Indexing page- notice the breadcrumb. Also note that the failure notification provides an option to attempt to rebuild the index again.
These examples show the rebuild statuses which are displayed via theSearch>Indexingpage:
This example shows both progress and error messages displayed within the Jobs menu. Clicking either of these jobs will open the related Details page to provide more information.
Turn off enable force merge
This setting improves the search results returned when customers re-run the same query multiple times or page through search results, preventing different results from displaying each time you run the same search. This setting adds a Flush and Force Merge function at the end of both the full and partial index rebuild to bring together the Elasticsearch results. By default, this setting is on, but if necessary, you can disable it using the following process.
- Go to Administration > System > Settings in the Admin Console.
- Search for Enable Force Merge.
- Set the toggle to No.
- Click Save.
Enable product number tiebreaker
In rare cases where two or more products in a search have the same score or short description that results in a tie in sorting priorities, enable this setting to use the product number as a tiebreaker.
- Go to Administration > System > Settings in the Admin Console.
- Search for Enable Product Number Tiebreaker.
- Set the toggle to Yes. If yes, search results will be sorted by product number to handle ties in the search term results when the relevance score is identical.
- Click Save.