Hi All
I am quite confused over a type mapping to fit my model.
Main type is "product". A product can be associated with multiple categories. For simplicity say categories are not nested but a product cn have more than 1 category.
Now I am thinking to create an index per category and store products routed to that category name.
This way if Product#1 is associated with Category#A and Category#B then it will indexed in 2 index (category A and B index). the doc will be exactly same in both.
This is okay (i suppose).
But if I run any search across all indices and matching this document, then the resultset will contain this Product#1 twice.
How can i avoid that?
( I dont want to store products in single index with category as array field and corresponding aliases with filtered on category)
Do suggest me how this can be done or done better.