I have three different types, e.g.: cars, boats, airplanes.
All of these types have similar fields like the name, color, prize, brand,
...
But they also differ in some fields like "maxAltitude".
Would it be better to use three different _type(s) or is it better to use
one _type with all fields? (When working with one _type I would add a
normal field "type" to distinguished)
What are the pros/cons?
Would it be better to use three different _type(s) or is it better to use
one _type with all fields? (When working with one _type I would add a
normal field "type" to distinguished)
What are the pros/cons?
Both options you are mentioning are strictly equivalent. Just do what feels
more convenient to you.
On Friday, October 4, 2013 10:49:17 AM UTC+2, Adrien Grand wrote:
Hi Joa,
On Thu, Oct 3, 2013 at 6:44 PM, joa <joafe...@gmail.com <javascript:>>wrote:
Would it be better to use three different _type(s) or is it better to use
one _type with all fields? (When working with one _type I would add a
normal field "type" to distinguished)
What are the pros/cons?
Both options you are mentioning are strictly equivalent. Just do what
feels more convenient to you.
Would it be better to use three different _type(s) or is it better to
use one _type with all fields? (When working with one _type I would add a
normal field "type" to distinguished)
What are the pros/cons?
Both options you are mentioning are strictly equivalent. Just do what
feels more convenient to you.
Suppose that you are routing different types by user_id. If a user becomes
very big, his documents across diferent types will become big => the shard
will become hot.
If the document_types are across multiple indexes, (say, we have 4 types in
4 indexes), than 4 shards will become hot, and you can spread these 4
shards across nodes in the cluster, so the node will be less hot than the
previous example.
When searching(query), if the smaller the shard(less document types in
index) the faster it is and you won't have to filter on the type. (i'm not
sure about this)
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.