#community-help

Advice on Splitting Indices for Entities

TLDR gab requested advice on splitting indices for vendor and product entities. Jason recommended storing them as separate collections.

Powered by Struct AI
Jul 27, 2021 (30 months ago)
gab
Photo of md5-8be2a24edf7a95c9c74abce4b1130c3e
gab
01:02 PM
Could you please give me some advice about about I should or not split indices. I have vendors that sell products. Vendor entity and Product entity have their own set of properties. I have mainly 2 ways to display my data in my website:
1- a page that display a product list (product centry)
2- a page that display a vendor list with some products they sell (vendor centry)

Should I create an indice for the product and another one for the vendor. Or, shall I create a kind of indice that would merge both?
Thanks
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
05:08 PM
gab I'd recommend storing them as two separate collections.
05:08
Jason
05:08 PM
This way you can use federated search / multi-search to show results from both indices together if needed
Jul 29, 2021 (30 months ago)
gab
Photo of md5-8be2a24edf7a95c9c74abce4b1130c3e
gab
07:21 AM
Thank you !