Search products using product relations

Is BaseProduct.RelationshipLinks or Variant.RelationshipLinks indexed?

We are using product relations to map complex upgrade paths and want to be able to search for products that have specific values for specific relationship types.

ProductCatalog.Search.TagNames doesn’t seem to have any tags related to relationships, so I am guessing they aren’t indexed?

Litium version: 6.3.1

No they are not indexed by default but you can add indexing, describe more what you are trying to do.

Imagine we have a productX that can be upgraded to productY.
There is an upgrade product the user can buy, with an UpgradeFrom relation to productX and an UpgradeTo relation to productY.

In reality, there are are a large number of upgrade paths between various products, using the relation schema described above.

We know which products the user currently owns via a third party integration. What we want to be able to do is run a search query that returns a list of upgrade products based on the list of products the user owns. That is, we want all products that have an UpgradeFrom relation with the known list of products we are passing to the search query.

Ok then you will need to do something similar to this method:
PreProcessDocument(IndexDocument document, string indexName) in class: CampaignIndexingProviderPreProcessor in project:
Litium.Accelerator in order to do custom indexing on relations.

This isn’t an accelerator project, but we’ve done similar index preprocessor tasks in another (also non-accelerator) project. thanks!

1 Like