Table of Contents

Class ProductIndexBuilder

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

The class ProductIndexBuilder represents index builder for products

[AddInName("Product Index Builder")]
public class ProductIndexBuilder : IndexBuilderBase, IIndexBuilder, IResumable, IIndexBuilderSchemaUpdater
Inheritance
ProductIndexBuilder
Implements
Inherited Members

Properties

BulkSize

[AddInParameterGroup("Product Index Builder Settings")]
[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

[AddInParameterGroup("Product Index Builder Settings")]
[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

[AddInParameterGroup("Product Index Builder Settings")]
[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

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("DoNotStoreDefaultFields")]
[AddInLabel("Do not store default fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Schema extender fields are not set to stored by default reducing index size significantly. Stored fields are only used by query publisher, not by product search;")]
public bool DoNotStoreDefaultFields { get; set; }

Property Value

bool

EmptyStringReplacement

[AddInParameterGroup("Product Index Builder Settings")]
[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

[AddInParameterGroup("Product Index Builder Settings")]
[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

[AddInParameterGroup("Product Index Builder Settings")]
[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

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("MaxProductsToIndex")]
[AddInLabel("Max products to index")]
[AddInParameterEditor(typeof(NumberParameterEditor), "Explanation=Stop after indexing this many products (useful for testing);")]
public int MaxProductsToIndex { get; set; }

Property Value

int

OnlyIndexActiveProducts

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("OnlyIndexActiveProducts")]
[AddInLabel("Only index active products")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Indexes only products with ProductActive equal to 1, reducing index size and build time;")]
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

[AddInParameterGroup("Product Index Builder Settings")]
[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

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("SkipAllExtendedFields")]
[AddInLabel("Skip all extended fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Omits extended fields (e.g., Campaign*, IsVariant, ManufacturerName, AssortmentIDs, StockLocationProductAvailable). Faster build, smaller index;")]
public bool SkipAllExtendedFields { get; set; }

Property Value

bool

SkipAssortments

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

Property Value

bool

SkipBomInfo

[AddInParameterGroup("Product Index Builder Settings")]
[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

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("SkipCategoryFields")]
[AddInLabel("Skip category fields")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Skips category values (EcomProductCategoryFieldValue). Category-based search/filtering not available;")]
public bool SkipCategoryFields { get; set; }

Property Value

bool

SkipCompletionRules

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("SkipCompletionRules")]
[AddInLabel("Skip completion rules")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Completion rule values are not indexed;")]
public bool SkipCompletionRules { get; set; }

Property Value

bool

SkipDataModels

[AddInParameterGroup("Product Index Builder Settings")]
[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

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

Property Value

bool

SkipExtenders

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("SkipExtenders")]
[AddInLabel("Skip extenders")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Ignores IndexBuilder extenders. No custom fields/changes from extenders are applied;")]
public bool SkipExtenders { get; set; }

Property Value

bool

SkipGroupSorting

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("SkipGroupSorting")]
[AddInLabel("Skip group sorting")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Omits group sort fields (Sort_GROUPID). Faster build, but group-based sorting not available;")]
public bool SkipGroupSorting { get; set; }

Property Value

bool

SkipGrouping

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("SkipGrouping")]
[AddInLabel("Skip grouping")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Omits group fields ('GroupIDs','GroupNames','GroupNumbers','GroupDescriptions','PrimaryGroupSort','ParentGroupIDs','ParentGroupNames'). Faster build, smaller index;")]
public bool SkipGrouping { get; set; }

Property Value

bool

SkipImagePatternImages

[AddInParameterGroup("Product Index Builder Settings")]
[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

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

Property Value

bool

SkipOrderhistory

[AddInParameterGroup("Product Index Builder Settings")]
[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

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

Property Value

bool

SkipProductTranslations

[AddInParameterGroup("Product Index Builder Settings")]
[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

[AddInParameterGroup("Product Index Builder Settings")]
[AddInParameter("SkipRelatedProducts")]
[AddInLabel("Skip related products")]
[AddInParameterEditor(typeof(YesNoParameterEditor), "Explanation=Omits ProductRelationGroup_* fields. Faster build, but related-product queries unavailable;")]
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