There's no problem having two types in the same index. Each key within the index includes the type.
When you query, only objects matching the type you query on will be returned.
So if you query for {data: "hello"}, only strings will be returned, etc.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…