Hello,
I am new in the elastic search and am trying to find out how it works and how can I use it for my project.
I am reading the documentation and I do not understand how I should structure my eshop data in order to insert them in the elastic search.
More specifically, a product belongs to many categories and the question is how can I create the index for these?
Currently, I have the following options:
- product index
I will create an index of products and each product will include its category information. The question for this option is:
if I want to change a category information in my shop then I need to change this information in all products that include this information in the elastic search. - Category index
I will create an index of categories and each category will include its products. The question for this option is:
if I want to change a product information in my shop then I need to change this information in all categories that include this product in the elastic search.
Are the above options valid in the way that the elastic works?
Are there any other options to structure my data in order to avoid the above difficulties?
Best regards,
Andreas