Multiple types or multiple indexes? Best practices

Hi,

I'm knew to ES and coming from SQL background, so looking for some advice on best practices.

My problem:
I have multiple buildings that each contain multiple documents specific to only that building. The mapping is the same for all buildings.

Should I be creating a new index for each building (there could be hundreds) or should I be creating a new type for each? Or maybe it's better to just add a building_id property to each document and filter them that way.

Any help is muchly appreciated!

Given that mappings are the same, I would say this is the way to go. You do not want to create lots of small indices as this is very inefficient and the ability to use multiple types within an index has been deprecated.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.