Skip to content

Instantly share code, notes, and snippets.

@quoeamaster
Last active November 30, 2019 11:02
Show Gist options
  • Save quoeamaster/ece597a259200c9ea78088cbb812273d to your computer and use it in GitHub Desktop.
Save quoeamaster/ece597a259200c9ea78088cbb812273d to your computer and use it in GitHub Desktop.
PUT imdb_nested
{
"mappings": {
"properties": {
"actors": {
"type": "nested",
"properties": {
"id": {
"type": "keyword"
},
"name": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
}
},
"avatar": {
"type": "keyword"
},
"home": {
"type": "keyword"
}
}
},
"movie": {
"properties": {
"year": {
"type": "integer"
},
"img": {
"type": "keyword"
},
"name": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
}
},
"duration": {
"properties": {
"display": {
"type": "keyword"
},
"in_min": {
"type": "short"
}
}
},
"genre": {
"type": "keyword"
},
"genre_display": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword"
}
}
},
"stars": {
"type": "half_float"
},
"desc": {
"type": "text"
},
"director": {
"type": "text",
"fields": {
"raw": {
"type": "keyword"
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment