Documentation

Ucommerce includes full API reference documentation and lots of helpful articles to help you build your e-commerce site as effortlessly as possible.

Topics Payment Providers
v7.18

Running the Scratch Indexer

The scratch indexer is a background process that runs all the indexers.
Triggering this will rebuild all the indexes from scratch.

When to run it

You should run the Scratch Indexer in cases where something has gone wrong with index, or if you need to be sure that the index is up to date with everything in it.
Running the Scratch Indexer can be a heavy operation, depending on how much data you have in the index.
So you should take that into account, and run it when needed.

How to run via UI

You can run the Scratch Indexer from the UI.
To do so, navigate to the "Search" node under "Settings" in Ucommerce, and press the "Index everything form scratch" button. View of back office with indexer button

How to run via code

You can also run the Scratch Indexer from your code like this:

    Ucommerce.Search.Indexers.IScratchIndexer scratchIndexer = Ucommerce.Infrastructure.ObjectFactory.Instance.Resolve<IScratchIndexer>();
    scratchIndexer.Index();