SaaS CMS has officially launched! Learn more now.

Class BaseCatalogIndexBuilder

Base class for the catalog indexer. Simplifies creating your own catalog indexer.

Inheritance
System.Object
BaseCatalogIndexBuilder
Implements
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Search.Extensions
Assembly: Mediachase.Search.Extensions.dll
Version: 11.8.3
Syntax
public abstract class BaseCatalogIndexBuilder : BaseIndexBuilder, ISearchIndexBuilder

Constructors

BaseCatalogIndexBuilder()

Creates an instance of the BaseCatalogIndexBuilder class.

Declaration
[Obsolete("Use protected constructor with NodeIdentityResolver. Will remain at least until January 2019.")]
public BaseCatalogIndexBuilder()

BaseCatalogIndexBuilder(ICatalogSystem, IPriceService, IInventoryService, MetaDataContext)

Initializes a new instance of the BaseCatalogIndexBuilder class.

Declaration
[Obsolete("Use constructor with NodeIdentityResolver. Will remain at least until January 2019.")]
protected BaseCatalogIndexBuilder(ICatalogSystem catalogSystem, IPriceService priceService, IInventoryService inventoryService, MetaDataContext metaDataContext)
Parameters
Type Name Description
ICatalogSystem catalogSystem

The catalog system.

IPriceService priceService

The price service.

IInventoryService inventoryService

The inventory service.

MetaDataContext metaDataContext

The meta data context.

BaseCatalogIndexBuilder(ICatalogSystem, IPriceService, IInventoryService, MetaDataContext, CatalogItemChangeManager)

Initializes a new instance of the BaseCatalogIndexBuilder class.

Declaration
[Obsolete("Use constructor with NodeIdentityResolver. Will remain at least until January 2019.")]
protected BaseCatalogIndexBuilder(ICatalogSystem catalogSystem, IPriceService priceService, IInventoryService inventoryService, MetaDataContext metaDataContext, CatalogItemChangeManager catalogItemChangeManager)
Parameters
Type Name Description
ICatalogSystem catalogSystem

The catalog system.

IPriceService priceService

The price service.

IInventoryService inventoryService

The inventory service.

MetaDataContext metaDataContext

The meta data context.

CatalogItemChangeManager catalogItemChangeManager

The catalog item change manager.

BaseCatalogIndexBuilder(ICatalogSystem, IPriceService, IInventoryService, MetaDataContext, CatalogItemChangeManager, NodeIdentityResolver)

Initializes a new instance of the BaseCatalogIndexBuilder class.

Declaration
protected BaseCatalogIndexBuilder(ICatalogSystem catalogSystem, IPriceService priceService, IInventoryService inventoryService, MetaDataContext metaDataContext, CatalogItemChangeManager catalogItemChangeManager, NodeIdentityResolver nodeIdentityResolver)
Parameters
Type Name Description
ICatalogSystem catalogSystem

The catalog system.

IPriceService priceService

The price service.

IInventoryService inventoryService

The inventory service.

MetaDataContext metaDataContext

The meta data context.

CatalogItemChangeManager catalogItemChangeManager

The catalog item change manager.

NodeIdentityResolver nodeIdentityResolver

The node identity resolver.

BaseCatalogIndexBuilder(MetaDataContext)

Initializes a new instance of the BaseCatalogIndexBuilder class.

Declaration
[Obsolete("Use constructor with NodeIdentityResolver. Will remain at least until January 2019.")]
protected BaseCatalogIndexBuilder(MetaDataContext metaDataContext)
Parameters
Type Name Description
MetaDataContext metaDataContext

The meta data context.

Properties

MetaDataContextClone

Gets the meta data context clone.

Declaration
protected MetaDataContext MetaDataContextClone { get; }
Property Value
Type Description
MetaDataContext

The meta data context clone.

Methods

AddPreoderAvailableFields(SearchDocument, String)

Adds the Preorder available date field.

Declaration
protected virtual void AddPreoderAvailableFields(SearchDocument searchDocument, string entryCode)
Parameters
Type Name Description
SearchDocument searchDocument

The search document to add fields to.

System.String entryCode

The category entry code.

AddPriceFields(SearchDocument, CatalogEntryDto.CatalogEntryRow, String)

Adds the price fields (saleprice, listprice).

Declaration
protected virtual void AddPriceFields(SearchDocument searchDocument, CatalogEntryDto.CatalogEntryRow catalogEntry, string defaultCurrency)
Parameters
Type Name Description
SearchDocument searchDocument

The search document to add fields to.

CatalogEntryDto.CatalogEntryRow catalogEntry

The catalog entry to add prices for.

System.String defaultCurrency

No longer used.

BuildIndex(Boolean)

Builds the index.

Declaration
public override void BuildIndex(bool rebuild)
Parameters
Type Name Description
System.Boolean rebuild

if set to true [rebuild].

Overrides

BuildPath(SearchDocument, String, CatalogNodeDto, Int32)

Builds the path, add to index document as _node and _outline.

Declaration
protected virtual void BuildPath(SearchDocument doc, string catalogName, CatalogNodeDto node, int level)
Parameters
Type Name Description
SearchDocument doc

The doc.

System.String catalogName

Name of the catalog.

CatalogNodeDto node

starting node to find (bottom up) its ancestors.

System.Int32 level

The level.

IndexCatalogEntryDto(IndexBuilder, CatalogEntryDto.CatalogEntryRow, String, String[])

Indexes the catalog entry dto.

Declaration
protected virtual int IndexCatalogEntryDto(IndexBuilder indexer, CatalogEntryDto.CatalogEntryRow entryRow, string defaultCurrency, string[] languages)
Parameters
Type Name Description
IndexBuilder indexer

The indexer.

CatalogEntryDto.CatalogEntryRow entryRow

The entry row.

System.String defaultCurrency

The default currency.

System.String[] languages

The languages.

Returns
Type Description
System.Int32

OnCatalogEntryIndex(ref SearchDocument, CatalogEntryDto.CatalogEntryRow, String)

Called when catalog entry is indexed. Override this method to add some extra fields.

Declaration
protected virtual void OnCatalogEntryIndex(ref SearchDocument document, CatalogEntryDto.CatalogEntryRow entry, string language)
Parameters
Type Name Description
SearchDocument document

The document.

CatalogEntryDto.CatalogEntryRow entry

The entry.

System.String language

The language.

RemoveDeletedEntries(DateTime)

Removes the deleted entries from the index.

Declaration
protected virtual void RemoveDeletedEntries(DateTime lastBuild)
Parameters
Type Name Description
System.DateTime lastBuild

The last build.

UpdateIndex(IEnumerable<Int32>)

Updates the specified items in the index.

Declaration
public override bool UpdateIndex(IEnumerable<int> itemIds)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Int32> itemIds

The ids of the items to update.

Returns
Type Description
System.Boolean

True if successful; otherwise, false.

Overrides

Implements