Developer forum

Forum » Feature requests » New Index - join with other table

New Index - join with other table

Nuno Aguiar
Reply

Hi,

 

It's been fairly common to create Items where a field is either a Product (item) field OR store the ProductID.

 

Right now to index all of that data we would have to create an IndexBuilderExtender. Would be great if we could add additional tables to that index. I was thinking something like being possible to:

  • JOIN ItemType_MyItems ON ItemFieldProductID = ProductID

 

Maybe adding a new testarea to add the query as described above. I don't have a very good suggestion on how to present that, but I simply see the benefits of such a feature. Possibly somebody else could take this idea and develop it further :)

 

Best Regards,

Nuno Aguiar


Replies

 
Nicolai Høeg Pedersen
Reply

Which index builder are you referring to?

 
Nicolai Høeg Pedersen
Reply

Which index builder are you referring to?

 
Nuno Aguiar
Reply

Hi Nicolai,

 

Very good question. I missed that part :) My feature request is to extend the current Dynamicweb.eCommerce.Indexing.ProductIndexBuilder

 

If we were to have the added on feature, this would be extremelly more flexible. We would be introducing a lot of complex "Item" logic to a product list (filters, facets,...), that today is not possible. Does that make sense to you?

 

Best Regards,

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

Not really. I like things simple and effecient - I get allergies when I hear "complex" in sentences with software :-). I would go with custom fields and product categories...

Anyways, that said, I do not think it is that complicated to extend the ProductIndexBuilder to have support for this. An index builder can take in settings and some of those settings could be a joining table, and the schema extender could pick it up, maybe.

Your example is join on product id. Problem is that could give you duplicate records - if 2 items exists related to the same product. Another issue is that productid is not the key of products - productid+variantid+languageid is.

BR Nicolai

 
Nuno Aguiar
Reply

Hi Nicolai,

 

I understand your concern:

  • Assign an Item to a product could fix this issue
    This would make it indexed
  • Duplicate records are indeed an issue, but we could try to do something like the group names and checkbox lists (comma splitted values)
  • Item lists would bean issue and something we need

 

Here's a better real life scenario to expose our issue:

  • We have Products (>20k)
  • We have Protocols (Item - relates to 1 or more products)
  • We have FAQs (Item - relates to 1 or more products)
  • We have Publications (Item - related to 1 or more products)

 

In the product list, the customer wants to filters products which a specific publication or Protocol. The way their business works, they have a publication every now and again and select a product group or a handfull of products it relates to. They don't want to go to every product and update a custom field with that publication date.

 

Does that make sense?

 

Best Regards,

Nuno Aguiar

 
Nicolai Høeg Pedersen
Reply

I understand. It does sound, however, as a very specific need.

A way to solve it could be saving the item information from the items onto the product records using notification subscribers.

BR Nicolai

 
Nuno Aguiar
Reply

Hi Nicolai,

 

That's a good idea too. We'll explore a bit. Thanks for the guidance.

 

Best Regards,

Nuno Aguiar