You may be aware of this, but since it wasn't obvious to me when I first
- You can use different "types" in a single index. The docs at each
type can have different fields.
Just be aware that when using a single index the fields across "types"
are not 100% independent of each other. By this I mean that if two different
have a field with the same name, the mapping type (number, boolean, etc)
of BOTH fields MUST be the same in both types.
Or as Shay explained in more detail (and probably more concisely) in a forum
On Tue, Jun 7, 2011 at 1:05 PM, Berkay Mollamustafaoglu
Couple of things if I understood correctly.
- You don't have to store the docs with separate fields. You can store it
as json and data would be searchable.
- You can use different "types" in a single index. The docs at each type
can have different fields.
In short, depending on number of documents you have, you may be able to
store all your data in a single index with multiple types.
mberkay on yahoo, google and skype
On Tue, Jun 7, 2011 at 1:58 PM, Andy firstname.lastname@example.org wrote:
Can you explain a bit on where the memory overhead comes from?
What kind of index structure would you recommend in this case?
On Jun 7, 1:18 am, Shay Banon shay.ba...@elasticsearch.com wrote:
Less of a wasted space, but, a field does come with a memory overhead.
On Tuesday, June 7, 2011 at 6:18 AM, Andy wrote:
I have many categories of products. Each category has its own unique
For example, category "Apparel" has fields "size", "color", "style".
Category "laptop" has fields "processor", "RAM", "screen size". etc
So if I use 1 index for all the products, there will be many
(potentially tens of thousands) fields. Each field will only be used
by a small portion of products. Is this "1 index" approach a good
design? Will all those empty fields lead to wasted space?