If I have an index of products and there are nested categories such as:
Men > Tops > Shirts
Should I store "Mens", "Mens>Tops", "Mens>Tops>Shirts" as separate categories and store them as an array:
product_categories : ["Mens", "Mens>Tops", "Mens>Tops>Shirts"] (or mapped ids)
Or should I store it as a nested data..something like:
product_category : {
level1: "Mens",
level2: "Tops",
level3: "Shirts"
}
Or is there another approach that is best?