AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

SearchIndexer Constructor

Initializes a new instance of the SearchIndexer class.

Namespace:  AdvantageCSP.Keyoti.SiteIndexer
Assembly:  AdvantageCSP.Keyoti.SiteIndexer (in AdvantageCSP.Keyoti.SiteIndexer.dll)

Syntax


public SearchIndexer(
	Configuration configuration,
	AdvantageSearchDomain searchDomain,
	string cookieLanguage
)

Parameters

configuration
Type: Configuration
The Keyoti configuration built for this search domain. A fresh instance is created per domain by the host.
searchDomain
Type: AdvantageSearchDomain
The search domain being crawled.
cookieLanguage
Type: String
The name of the cookie carrying the language identifier; the host always passes "AdvantageLanguageId".

Remarks


This signature is load-bearing and nothing in the type system enforces it. The host activates the plug-in with Activator.CreateInstance(type, configuration, currentDomain, SearchConstants.CookieLanguageID), so the constructor must be public, must take exactly Keyoti.SearchEngine.Configuration, AdvantageSearchDomain and String in that order, and must chain to the base. A mismatch is not a compile error — it surfaces at run time as a MissingMethodException that escapes and skips the domain.

By the time this body runs the base has already assigned SearchDomain, Configuration, PathsToExclude, PathsToInclude and CookieLanguageID, and has subscribed its own action handler plus this class's Dispatcher_Action(Object, ActionEventArgs) and Dispatcher_NeedObject(Object, NeedObjectEventArgs) to the dispatcher. Virtual dispatch into the overrides is therefore live before the derived fields are assigned — in practice the dispatcher only fires during the crawl, but do not rely on that by starting work here. The base constructor also swallows and logs every exception it raises, so a failed event binding produces a live object with no subscriptions and a crawl that silently indexes nothing; check the search error table before chasing a configuration problem.

The only work done here is creating the ExtendedParserProvider that Dispatcher_NeedObject(Object, NeedObjectEventArgs) hands back to the crawler. A custom indexer that supplies its own parsers constructs them in the same place.