I want to store and query different attributes per document. Something like
this:
{
name: "doc1",
metadata: [
{ color: "red" },
{ data: [ "value1", "value2", "value3" ] },
{ size: 500 },
{ avail: true },
]
},
...
{
name: "doc4980",
metadata: [
{ otherValues: [ 55, 33 ] },
{ important: true },
]
}
The metadata array may be different for lots of documents, as its entries
will be defined by the user whenever a new attribute is needed.
Using the attribute name as field name (JSON left side) may lead to a high
memory usage, so I put the names to the JSON right side, too. But I think
the following will not work, because of the different types (int, string,
...) of the value (v) field:
"_source" : {
"name": "doc4980",
"metadata":[
{
k: "otherValues",
v: [ 55, 33 ]
},
{
k: "important",
v: true
}
]
}
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.