Hi

I would like to know if there are suggestions on how I can handle my task below. Please pardon the lengthy description.

I need to store product attributes in a collection.
Attributes like Size, Color, Material etc.

Each product can have up to max of 5 attributes.
Between products, their attributes can be different.
Attribute can be added and deleted from the source system.

A simple example of possible product attributes information
Product    Attribute    Value
P1    Size      M
P1    Size      L
P1    Color    Red
P2    Size      M
P2    Color    Blue
P3    Material    Plastic
P4    Amp     12

I have come up with 2 approaches to it:

1.
If I store each attribute as a field in a collection, there will be alot of fields to create. Furthermore as attribute can be added and deleted, the maintaining of the attributes fields in solr will be difficult. However with each field for each attribute the product attribute facets will be easy and straight forward.
Example,
Size facet:
M - 2
L - 1

Color facet:
Red - 1
Blue - 1

2.
Another approach is to create only a field to store the attributes and attributes value of a product.
This field will be multi-value.
Solr does not need to bother with new attribute and deleted attribute.

Eg. P_ProductAttribute

P1:
<arr name="P_ProductAttribute">
<str>Size-M</str>
<str>Size-L</str>
<str>Color-Red</str>
</arr>

However the product attribute facet with this approach will required the UI to iterate through the facet, extract the attributes and their values to display as individual attribute facet in the search result page.
Eg, of P_ProductAttribute facet:

Color-Blue>1
Color-Red>1
Size-L>1
Size-M>2

Any other suggestion on how I can approach this?

Regards,
Derek

----------------------
CONFIDENTIALITY NOTICE This e-mail (including any attachments) may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please inform the sender immediately and delete this e-mail (including any attachments) from your computer, and you must not use, disclose to anyone else or copy this e-mail (including any attachments), whether in whole or in part.
This e-mail and any reply to it may be monitored for security, legal, 
regulatory compliance and/or other appropriate reasons.

Reply via email to