Searching for multiple commerce types with Find

Vote:
 

I have a situation I'm not sure how best to resolve.  Currently, I have 3 custom commerce objects, CustomVariant, CustomBundle & CustomPackage.  These all inherit from their respective EPiServer Content types for Variant, Bundle and Package.

What I'm trying to do is implement a Product Listing page which queries Find and pulls back all instances of those 3 custom types that are valid for a category.

At the moment, I'm using Client.Search, but this means I have to do 3 searches, one for each Custom type.  I need to ensure I can filter on a number of properties that appear on the 3 custom types, so I can't search for EntryContentBase objects.

Does anyone have a better solution than performing 3 distinct searches and then merging the results together?

Thanks in advance.

Rob.

#141682
Nov 18, 2015 16:05
Vote:
 

How about creating a common interface and search for that instead?

#141756
Nov 19, 2015 15:28
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.