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

Getting started with ElasticSearch in Ucommerce

Setting up ElasticSearch

Ucommerce requires Elastic Search version 7.15 as a minimum.

If you need to set up a local instance of Elastic Search. You can download and install it from the elastic website. and follow their guide.

For a cloud instance we recommend that you follow the standard Elastic Search Documentation on getting started..

How to enable the Elasticsearch search provider for Ucommerce

1) Find the Ucommerce Apps dir. Rename the dir namedUcommerce.Search.Lucene under Ucommerce app directory to Ucommerce.Search.Lucene.disabled

2) Rename Ucommerce.Search.ElasticSearch.disabled to Ucommerce.Search.ElasticSearch

3 Reset IIS or recycle your app pool.

4) Head to Ucommerce -> Settings -> Search and hit _Index everything from scratch_.

By default, Ucommerce will connect to ElasticSearch on http://localhost:9200. If you are running Elastic Search in cloud please read this configuration article.

Additional steps when upgrading from an earlier version of Ucommerce:

1) When Ucommerce is upgraded, all the configuration for the Ucommerce apps is replaced. In order to make sure you preserve your custom configuration, it should live in a separate app e.g. Ucommerce.Search.Elasticsearch.Avenue right next to our Ucommerce.Search.Elasticsearch app.

1) Ucommerce Index implementations are now provider-independent. If you inherited an existing index implementation, you will have to update your index to inherit the new Ucommerce.Search.Index<T> instead.

Before

    
    
        <component id="DefaultProductsIndex"
        service="Ucommerce.Search.IIndex`1[[Ucommerce.Search.Models.Product,  Ucommerce.Search]], Ucommerce.Search"
        type="Ucommerce.Search.Lucene.LuceneDiskIndex`1[[Ucommerce.Search.Models.Product,  Ucommerce.Search]], Ucommerce.Search.ElasticSearch">
            <forwardedTypes>
                <add service="Ucommerce.Search.IIndexAutomatically, Ucommerce.Search" />
            </forwardedTypes>
            <parameters>
                <Definition>${ProductsIndexDefinition}</Definition>
                <Fetcher>${ProductFetcher}</Fetcher>
            </parameters>
        </component>
        
    

After

    
    
        <component id="DefaultProductsIndex"
        service="Ucommerce.Search.IIndex`1[[Ucommerce.Search.Models.Product,  Ucommerce.Search]], Ucommerce.Search"
        type="Ucommerce.Search.Index`1[[Ucommerce.Search.Models.Product,  Ucommerce.Search]], Ucommerce.Search.ElasticSearch">
            <forwardedTypes>
                <add service="Ucommerce.Search.NonGeneric.IIndex, Ucommerce.Search" />
            </forwardedTypes>
            <parameters>
                <Definition>${ProductsIndexDefinition}</Definition>
                <Fetcher>${ProductFetcher}</Fetcher>
            </parameters>
        </component>
    
  • Ucommerce.Search.Lucene.LuceneDiskIndex is replaced by Ucommerce.Search.Index<T>.
  • The forwarded type Ucommerce.Search.IIndexAutomatically is replaced by Ucommerce.Search.NonGeneric.IIndex