Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page aims to depict the default handlers and pipes found in the connector.

Handlers are the logical steps in indexing (both full and incremental indexing). A handler is given a command which it must execute. Some handlers, besides executing the command, have some internal sub-steps called pipes, which run in a specific order and help to fulfill the handler’s responsibility. Handlers together with their pipes compose an indexing chain. Think of the indexing chain as the logical flow when indexing content from your website:

  • Indexing chain

    • Handler 1

    • Handler 2

      • Pipe 2.1

      • Pipe 2.2

    • Handler 3

      • Pipe 3.1

Table of Contents
minLevel2
maxLevel3

1. Full Indexing Handlers

Delete Previous Index Handler

Class name: DeletePreviousIndexHandler

Base: IndexingHandlerBase

Description: Deletes the previous index from Hawksearch. This is executed only if there are already 2 indexes created in Hawksearch. It is needed because Hawksearch only allows for 2 indexes to exist at the same time.


Create Index Handler

Class name: CreateIndexHandler

Base: IndexingHandlerBase

Description: Creates a new Hawksearch index using the suffix specified in web.config (if any).


Categories Indexing Handler

Class name: CategoriesIndexingHandler<T> where T : NodeContent

Base: IndexingHandlerBase

Description: Indexes all categories from Optimizely’s catalogs.

Pipes:

Order

Pipe

Description

100

CategoriesReaderPipe<T>

Traverses the catalog structure and loads all the categories

200

CategoriesTransformerPipe<T>

Transforms the traversed categories into Hierarchy objects which will be sent to Hawksearch

300

CategoriesRootPipe<T>

Sets the ParentHierarchyId to “1” for thetop-most categories under the catalog root, as required by Hawksearch

500

CategoriesIndexingPipe<T>

Makes the necessary requests to the Hierarchy API in order to index the transformed categories


Entries Indexing Handler

Class name: EntriesIndexingHandler<T> where T : EntryContentBase

Base: IndexingHandlerBase

Description: Indexes different type of entries after loading them in batches. Represented by an abstract class which ProductsIndexingHandler, VariantsIndexingHandler, BundlesIndexingHandler and PackagesIndexingHandler inherit from. The handler’s pipes are shared with its children types.

Pipes:

Order

Pipe

Description

200

EntriesTransformerPipe<T>

Transforms the loaded entries into Item objects which will be sent to Hawksearch

250

EntriesDecoratedPropertiesPipe<T>

Further populates the Item objects with the properties decorated with [IncludeInHawksearch] attribute

300

EntriesCategoryPipe<T>

Sets the categories that the entries belong to on the Item objects

600

EntriesIndexingPipe<T>

Makes the necessary requests to the Indexing API in order to index the transformed items


Products Indexing Handler

Class name: ProductsIndexingHandler<T> where T : ProductContent

Base: EntriesIndexingHandler<T> where T : EntryContentBase

Description: Indexes products. Generic type V must be of type VariationContent for pipes.

Pipes:

Order

Pipe

Description

250

ProductVariantsPropertiesPipe<T,V>

OPTIONAL Pipe. Rolls up the attributes decorated with [IncludeInHawksearch] of the variants inside the parent product

250

ProductVariantsChildrenPipe<T, V>

OPTIONAL Pipe. Adds the attributes decorated with [IncludeInHawksearch] of the variants to the parent product’s hawk_child_attributes JSON property


Variants Indexing Handler

Class name: VariantsIndexingHandler<T> where T : VariationContent

Base: EntriesIndexingHandler<T> where T : EntryContentBase

Description: Indexes variants. This is not available in the case of “Variant Attributes Roll Up” indexing strategy.

Pipes:

Order

Pipe

Description

400

VariantPriceIndexingPipe<T>

OPTIONAL Pipe. Indexes the prices for variants

500

VariantInventoryIndexingPipe<T>

OPTIONAL Pipe. Indexes the inventories for variants


Bundles Indexing Handler

Class name: BundlesIndexingHandler<T> where T : BundleContent

Base: EntriesIndexingHandler<T> where T : EntryContentBase

Description: Indexes bundles. Generic type V must be of type VariationContent for pipes.

Pipes:

Order

Pipe

Description

250

BundleVariantsPropertiesPipe<T,V>

OPTIONAL Pipe. Rolls up the attributes decorated with [IncludeInHawksearch] of the variants inside the parent bundle

250

BundleVariantsChildrenPipe<T, V>

OPTIONAL Pipe. Adds the attributes decorated with [IncludeInHawksearch] of the variants to the parent bundle’s hawk_child_attributes JSON property


Packages Indexing Handler

Class name: PackagesIndexingHandler<T> where T : PackageContent

Base: EntriesIndexingHandler<T> where T : EntryContentBase

Description: Indexes packages. Generic type V must be of type VariationContent for pipes.

Pipes:

Order

Pipe

Description

250

PackageVariantsPropertiesPipe<T,V>

OPTIONAL Pipe. Rolls up the attributes decorated with [IncludeInHawksearch] of the variants inside the parent package

250

PackageVariantsChildrenPipe<T, V>

OPTIONAL Pipe. Adds the attributes decorated with [IncludeInHawksearch] of the variants to the parent package’s hawk_child_attributes JSON property

400

PackagePriceIndexingPipe<T>

OPTIONAL Pipe. Indexes the prices for packages

500

PackageInventoryIndexingPipe<T>

OPTIONAL Pipe. Indexes the inventories for packages


Pages Indexing Handler

Class name: PagesIndexingHandler<T> where T : PageData

Base: IndexingHandlerBase

Description: Indexes CMS pages.

Pipes:

Order

Pipe

Description

200

PagesTransformerPipe<T>

Transforms the loaded pages into Item objects which will be sent to Hawksearch

300

PagesDecoratedPropertiesPipe<T>

Further populates the Item objects with the properties decorated with [IncludeInHawksearch] attribute

500

PagesIndexingPipe<T>

Makes the necessary requests to the Indexing API in order to index the transformed items


Set Current Index Handler

Class name: SetCurrentIndexHandler

Base: IndexingHandlerBase

Description: Sets the current Hawksearch index to the newly created one.

2. Incremental Indexing Handlers

Get Current Index Handler

Class name: GetCurrentIndexHandler

Base: IndexingHandlerBase

Description: Gets the current Hawksearch index.


Categories Incremental Indexing Handler

Class name: CategoriesIncrementalIndexingHandler<T> where T : NodeContent

Base: IndexingHandlerBase

Description: Indexes all the changed categories.

Pipes:

Order

Pipe

Description

100

CategoriesIncrementalReaderPipe<T>

Reads from the IndexingQueue database table the changed categories

200

CategoriesTransformerPipe<T>

Transforms the changed categories into Hierarchy objects which will be sent to Hawksearch

300

CategoriesRootPipe<T>

Sets the ParentHierarchyId to “1” for thetop-most categories under the catalog root, as required by Hawksearch

500

CategoriesIndexingPipe<T>

Makes the necessary requests to the Hierarchy API in order to index the transformed categories


Categories Deletion Handler

Class name: CategoriesDeletionHandler

Base: IndexingHandlerBase

Description: Deletes from the index all the removed categories.

Pipes:

Order

Pipe

Description

100

CategoriesDeletionReaderPipe

Reads from the IndexingQueue database table the removed categories which will be deleted from the index

500

CategoriesDeletionPipe

Makes the necessary delete requests to the Hierarchy API in order to delete the removed categories


Categories Cascade Indexing Handler

Class name: CategoriesCascadeIndexingHandler

Base: IndexingHandlerBase

Description: It processes cascading events by adding events for all entities (product/variant/bundle/package) affected by the original cascading to the custom IndexingQueue table.

E.g., moving a category is originally saved in the IndexingQueue table as a cascading event of type “hierarchycascade“. In this step, the system adds events to the IndexingQueue table for all products / variants beneath that previously moved category.


Entries Incremental Indexing Handler

Class name: EntriesIncrementalIndexingHandler<T> where T : EntryContentBase

Base: IndexingHandlerBase

Description: Indexes different types of changed entries. Represented by an abstract class which ProductsIncrementalIndexingHandler, VariantsIncrementalIndexingHandler, BundlesIncrementalIndexingHandler and PackagesIncrementalIndexingHandler inherit from. The handler’s pipes are shared with its children types.

Pipes:

Order

Pipe

Description

200

EntriesTransformerPipe<T>

Transforms the loaded entries into Item objects which will be sent to Hawksearch

250

EntriesDecoratedPropertiesPipe<T>

Further populates the Item objects with the properties decorated with [IncludeInHawksearch] attribute

300

EntriesCategoryPipe<T>

Sets the categories that the entries belong to on the Item objects

600

EntriesIndexingPipe<T>

Makes the necessary requests to the Indexing API in order to index the transformed items


Products Incremental Indexing Handler

Class name: ProductsIncrementalIndexingHandler<T> where T : ProductContent

Base: EntriesIncrementalIndexingHandler<T> where T : EntryContentBase

Description: Indexes changed products. Generic type V must be of type VariationContent for pipes.

Pipes:

Order

Pipe

Description

250

ProductVariantsPropertiesPipe<T,V>

OPTIONAL Pipe. Rolls up the attributes decorated with [IncludeInHawksearch] of the variants inside the parent product

250

ProductVariantsChildrenPipe<T, V>

OPTIONAL Pipe. Adds the attributes decorated with [IncludeInHawksearch] of the variants to the parent product’s hawk_child_attributes JSON property


Variants Incremental Indexing Handler

Class name: VariantsIncrementalIndexingHandler<T> where T : VariationContent

Base: EntriesIncrementalIndexingHandler<T> where T : EntryContentBase

Description: Indexes changed variants. This is not available in the case of “Variant Attributes Roll Up” indexing strategy.

Pipes:

Order

Pipe

Description

400

VariantPriceIndexingPipe<T>

OPTIONAL Pipe. Indexes the prices for variants

500

VariantInventoryIndexingPipe<T>

OPTIONAL Pipe. Indexes the inventories for variants


Bundles Incremental Indexing Handler

Class name: BundlesIncrementalIndexingHandler<T> where T : BundleContent

Base: EntriesIncrementalIndexingHandler<T> where T : EntryContentBase

Description: Indexes changed bundles. Generic type V must be of type VariationContent for pipes.

Pipes:

Order

Pipe

Description

250

BundleVariantsPropertiesPipe<T,V>

OPTIONAL Pipe. Rolls up the attributes decorated with [IncludeInHawksearch] of the variants inside the parent bundle

250

BundleVariantsChildrenPipe<T, V>

OPTIONAL Pipe. Adds the attributes decorated with [IncludeInHawksearch] of the variants to the parent bundle’s hawk_child_attributes JSON property


Packages Incremental Indexing Handler

Class name: PackagesIncrementalIndexingHandler<T> where T : PackageContent

Base: EntriesIncrementalIndexingHandler<T> where T : EntryContentBase

Description: Indexes changed packages. Generic type V must be of type VariationContent for pipes.

Pipes:

Order

Pipe

Description

250

PackageVariantsPropertiesPipe<T,V>

OPTIONAL Pipe. Rolls up the attributes decorated with [IncludeInHawksearch] of the variants inside the parent package

250

PackageVariantsChildrenPipe<T, V>

OPTIONAL Pipe. Adds the attributes decorated with [IncludeInHawksearch] of the variants to the parent package’s hawk_child_attributes JSON property

400

PackagePriceIndexingPipe<T>

OPTIONAL Pipe. Indexes the prices for packages

500

PackageInventoryIndexingPipe<T>

OPTIONAL Pipe. Indexes the inventories for packages


Pages Incremental Indexing Handler

Class name: PagesIncrementalIndexingHandler<T> where T : PageData

Base: IndexingHandlerBase

Description: Indexes changed pages.

Pipes:

Order

Pipe

Description

200

PagesTransformerPipe<T>

Transforms the loaded pages into Item objects which will be sent to Hawksearch

300

PagesDecoratedPropertiesPipe<T>

Further populates the Item objects with the properties decorated with [IncludeInHawksearch] attribute

500

PagesIndexingPipe<T>

Makes the necessary requests to the Indexing API in order to index the transformed items


Entries Deletion Handler

Class name: EntriesDeletionHandler

Base: IndexingHandlerBase

Description: Deletes from the index all the removed entries.

Pipes:

Order

Pipe

Description

600

EntriesDeletionPipe

Makes the necessary delete requests to the Indexing API in order to delete the removed entries


Pages Deletion Handler

Class name: PagesDeletionHandler

Base: IndexingHandlerBase

Description: Deletes from the index all the removed pages.

Pipes:

Order

Pipe

Description

500

PagesDeletionPipe

Makes the necessary requests to the Indexing API in order to delete the removed pages

3. Common Handlers

  • Handlers used both for full and incremental indexing

Hierarchy Rebuild Handler

Class name: HierarchyRebuildHandler

Base: IndexingHandlerBase

Description: Rebuilds the Hawksearch hierarchy after organizing the categories.


Rebuild Index Handler

Class name: RebuildIndexHandler

Base: IndexingHandlerBase

Description: Rebuilds the Hawksearch index after adding items.