Table of Contents

Class ProductIndexBuilder

Namespace
Dynamicweb.Ecommerce.Indexing
Assembly
Dynamicweb.Ecommerce.dll

The class ProductIndexBuilder represents index builder for products

public class ProductIndexBuilder : IndexBuilderBase, IIndexBuilder, IResumable, IIndexBuilderSchemaUpdater
Inheritance
ProductIndexBuilder
Implements
Inherited Members

Properties

BulkSize

[AddInParameter("BulkSize")]
[AddInLabel("Bulk size")]
[AddInParameterEditor(typeof(NumberParameterEditor), "infoText=Default is 500; Explanation=Number of products being built at a time;")]
public int BulkSize { get; set; }

Property Value

int

DefaultSettings

Gets default settings collection

public override IDictionary<string, object> DefaultSettings { get; }

Property Value

IDictionary<string, object>

DoNotAnalyzeDefaultFields

[AddInParameter("DoNotAnalyzeDefaultFields")]
[AddInLabel("Do not analyze default fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Schema extender fields are not set to analyzed by default;")]
public bool DoNotAnalyzeDefaultFields { get; set; }

Property Value

bool

DoNotFailOnMismatchingProductCount

[AddInParameter("DoNotFailOnMismatchingProductCount")]
[AddInLabel("Do not fail on mismatching product count")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Allows index builds to continue even if the product counts before and after indexing differ, useful during simultaneous data imports;")]
public bool DoNotFailOnMismatchingProductCount { get; set; }

Property Value

bool

DoNotStoreDefaultFields

[AddInParameter("DoNotStoreDefaultFields")]
[AddInLabel("Do not store default fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Schema extender fields are not set to stored by default;")]
public bool DoNotStoreDefaultFields { get; set; }

Property Value

bool

EmptyStringReplacement

[AddInParameter("EmptyStringReplacement")]
[AddInLabel("Empty string replacement")]
[AddInParameterEditor(typeof(TextParameterEditor), "Explanation=Specifies a placeholder value to index fields that are empty, ensuring they can be included in search queries;")]
public string EmptyStringReplacement { get; set; }

Property Value

string

HandleInheritedCategoryValues

[AddInParameter("HandleInheritedCategoryValues")]
[AddInLabel("Handle inherited category values")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Indexes inherit product category values, enhancing search capabilities but with a significant cost of performance;")]
public bool HandleInheritedCategoryValues { get; set; }

Property Value

bool

HoursToUpdate

[AddInParameter("HoursToUpdate")]
[AddInLabel("Hours to update")]
[AddInParameterEditor(typeof(NumberParameterEditor), "Explanation=If combined with the builder action 'Update', only products updated within the hours specified here are rebuilt;")]
public int HoursToUpdate { get; set; }

Property Value

int

MaxProductsToIndex

[AddInParameter("MaxProductsToIndex")]
[AddInLabel("Max products to index")]
[AddInParameterEditor(typeof(NumberParameterEditor), "")]
public int MaxProductsToIndex { get; set; }

Property Value

int

OnlyIndexActiveProducts

[AddInParameter("OnlyIndexActiveProducts")]
[AddInLabel("Only index active products")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "")]
public bool OnlyIndexActiveProducts { get; set; }

Property Value

bool

ProductIDs

Gets or sets a list of product ids, which will be updated in the index

public IEnumerable<string> ProductIDs { get; set; }

Property Value

IEnumerable<string>

Resume

Gets or sets a value indicating the index opened in insert mode

public bool Resume { get; set; }

Property Value

bool

ShopsToIndex

[AddInParameter("ShopsToIndex")]
[AddInLabel("Shops to index")]
[AddInParameterEditor(typeof(TextParameterEditor), "Explanation=Limits indexing to products from a specified comma-separated list of shop IDs;")]
public string ShopsToIndex { get; set; }

Property Value

string

SkipAllExtendedFields

[AddInParameter("SkipAllExtendedFields")]
[AddInLabel("Skip all extended fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Skips the fields “CampaignStartTime”, “CampaignEndTime”, “CampaignShowProductsAfterExpiration”, “IsVariant”, “ManufacturerName”, “AssortmentIDs” and “StockLocationProductAvailable”;")]
public bool SkipAllExtendedFields { get; set; }

Property Value

bool

SkipAssortments

[AddInParameter("SkipAssortments")]
[AddInLabel("Skip assortment fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Assortment fields are not indexed;")]
public bool SkipAssortments { get; set; }

Property Value

bool

SkipBomInfo

[AddInParameter("SkipBomInfo")]
[AddInLabel("Skip item on boms field")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=BOM (Bill of Materials) fields are not indexed;")]
public bool SkipBomInfo { get; set; }

Property Value

bool

SkipCategoryFields

[AddInParameter("SkipCategoryFields")]
[AddInLabel("Skip category fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "")]
public bool SkipCategoryFields { get; set; }

Property Value

bool

SkipDataModels

[AddInParameter("SkipDataModels")]
[AddInLabel("Skip DataModel fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Data Model fields are not indexed;")]
public bool SkipDataModels { get; set; }

Property Value

bool

SkipDetailImages

[AddInParameter("SkipDetailImages")]
[AddInLabel("Skip detail images")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Detail images are not indexed;")]
public bool SkipDetailImages { get; set; }

Property Value

bool

SkipExtenders

[AddInParameter("SkipExtenders")]
[AddInLabel("Skip extenders")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Prevents custom extenders from adding, updating, or removing fields in the index;")]
public bool SkipExtenders { get; set; }

Property Value

bool

SkipGroupSorting

[AddInParameter("SkipGroupSorting")]
[AddInLabel("Skip group sorting")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Prevents group sorting fields from being indexed. May improve performance;")]
public bool SkipGroupSorting { get; set; }

Property Value

bool

SkipGrouping

[AddInParameter("SkipGrouping")]
[AddInLabel("Skip grouping")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Skips the fields: 'GroupIDs', 'GroupNames', 'GroupNumbers', 'GroupDescriptions', 'PrimaryGroupSort', 'ParentGroupIDs', and 'ParentGroupNames';")]
public bool SkipGrouping { get; set; }

Property Value

bool

SkipImagePatternImages

[AddInParameter("SkipImagePatternImages")]
[AddInLabel("Skip image pattern images")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Image pattern images are not indexed;")]
public bool SkipImagePatternImages { get; set; }

Property Value

bool

SkipImages

[AddInParameter("SkipImages")]
[AddInLabel("Skip images")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Image paths are not indexed;")]
public bool SkipImages { get; set; }

Property Value

bool

SkipOrderhistory

[AddInParameter("SkipOrderhistory")]
[AddInLabel("Skip order history fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Order history fields are not indexed;")]
public bool SkipOrderhistory { get; set; }

Property Value

bool

SkipPrices

[AddInParameter("SkipPrices")]
[AddInLabel("Skip prices")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Product prices are not indexed;")]
public bool SkipPrices { get; set; }

Property Value

bool

SkipProductTranslations

[AddInParameter("SkipProductTranslations")]
[AddInLabel("Skip product translations")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Fields related to product translations are not indexed;")]
public bool SkipProductTranslations { get; set; }

Property Value

bool

SkipRelatedProducts

[AddInParameter("SkipRelatedProducts")]
[AddInLabel("Skip related products")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Prevents related products from being indexed;")]
public bool SkipRelatedProducts { get; set; }

Property Value

bool

SupportedActions

Gets the supported actions

public override IEnumerable<string> SupportedActions { get; }

Property Value

IEnumerable<string>

Methods

Build(IIndexWriter, Tracker)

Build the index

public override void Build(IIndexWriter writer, Tracker tracker)

Parameters

writer IIndexWriter

An IIndexWriter instance

tracker Tracker

A Tracker instance

GetFields()

Defines GetFields required operation

public override IEnumerable<FieldDefinitionBase> GetFields()

Returns

IEnumerable<FieldDefinitionBase>

UpdateSchema(SchemaDefinition)

Updates the selected schema according to builder settings

public void UpdateSchema(SchemaDefinition schema)

Parameters

schema SchemaDefinition

Selected schema

To top