I have a 100 fields to be stored, whose structure is defined. Which structure is preferred of these both?
// Mapping 1
{
"data": "nested"
}
// Sample Data Structure 1
{
"data": {
"f1": "value",
"f2": ["value1", "value2"]
.
.
.
.
"f100": 123
}
}
// Mapping 2
{
"f1": "keyword",
"f2": "keyword",
.
.
.
.
"f100": "integer"
}
// Sample Data Structure 2
{
"f1": "value",
"f2": ["value1", "value2"]
.
.
.
.
"f100": 123
}
What are the benefits of each of these structures? Also need to know the pros and cons of each of these on large scale data.