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: 10.8.0
Syntax
public abstract class BaseCatalogIndexBuilder : BaseIndexBuilder, ISearchIndexBuilder

Constructors

BaseCatalogIndexBuilder()

Creates an instance of the BaseCatalogIndexBuilder class.

Declaration
public BaseCatalogIndexBuilder()

BaseCatalogIndexBuilder(ICatalogSystem, IPriceService)

Creates an instance of the BaseCatalogIndexBuilder class with explicit dependencies.

Declaration
[Obsolete("This constructor should no longer be used. Will remain at least until July 2016.")]
public BaseCatalogIndexBuilder(ICatalogSystem catalogSystem, IPriceService priceService)
Parameters
Type Name Description
ICatalogSystem catalogSystem

The catalog system dependency.

IPriceService priceService

The pricing system dependency.

BaseCatalogIndexBuilder(ICatalogSystem, IPriceService, IInventoryService)

Creates an instance of the BaseCatalogIndexBuilder class with explicit dependencies.

Declaration
[Obsolete("This constructor should no longer be used. Will remain at least until July 2016.")]
public BaseCatalogIndexBuilder(ICatalogSystem catalogSystem, IPriceService priceService, IInventoryService inventoryService)
Parameters
Type Name Description
ICatalogSystem catalogSystem

The catalog system dependency.

IPriceService priceService

The pricing system dependency.

IInventoryService inventoryService

The inventory system dependency.

BaseCatalogIndexBuilder(ICatalogSystem, IPriceService, IInventoryService, MetaDataContext)

Initializes a new instance of the BaseCatalogIndexBuilder class.

Declaration
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(MetaDataContext)

Initializes a new instance of the BaseCatalogIndexBuilder class.

Declaration
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