Skip to content

Instantly share code, notes, and snippets.

@sulmansarwar
Created October 2, 2019 08:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sulmansarwar/780e8102ea4530efa92385363dc8851e to your computer and use it in GitHub Desktop.
Save sulmansarwar/780e8102ea4530efa92385363dc8851e to your computer and use it in GitHub Desktop.
Nested Fields
---------------------
Following is what is meant by nested_fields. This will break. Index will not be created as nested_fields are greater than 2.
"mappings": {
"properties": {
"user": {
"type": "nested"
},
"address":{
"type": "nested"
},
"phone":{
"type": "nested"
}
}
},
"settings": {
"index.mapping.nested_fields.limit": 2
}
Nested Objects
-----------------------
Following is what is meant by nested_objects. This will break as there are more than 2 nested_objects
"user": [
{
"first": "John",
"last": "Smith"
},
{
"first": "Alice",
"last": "White"
},
{
"first": "Joe",
"last": "Bloggs"
}
]
settings{
"index.mapping.nested_objects.limit": 2
}
Depth
------------
Following is what is meant by depth. This will break as depth of json structure is more than 2.
{
"field2": {
"field3": {
"field4": {
"key": "value3"
}
}
}
}
settings{
"index.mapping.depth.limit":2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment