Skip to content

Instantly share code, notes, and snippets.

@andreluiz1987
Last active July 7, 2022 13:44
Show Gist options
  • Save andreluiz1987/22dcc3addc82206ac6ab3e211b1ad0f5 to your computer and use it in GitHub Desktop.
Save andreluiz1987/22dcc3addc82206ac6ab3e211b1ad0f5 to your computer and use it in GitHub Desktop.
{
"settings": {
"analysis": {
"analyzer": {
"en_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase","stop" ]
},
"shingle_analyzer": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"shingle_filter"
]
}
},
"filter": {
"shingle_filter": {
"type": "shingle",
"min_shingle_size": 2,
"max_shingle_size": 3
}
}
}
},
"mappings": {
"properties": {
"title": {
"type": "text",
"analyzer": "en_analyzer",
"fields": {
"suggest": {
"type": "text",
"analyzer": "shingle_analyzer"
}
}
},
"actors": {
"type": "text",
"analyzer": "en_analyzer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"date": {
"type": "keyword",
"doc_values": false
},
"description": {
"type": "text",
"analyzer": "en_analyzer",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"director": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"genre": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"metascore": {
"type": "long"
},
"rating": {
"type": "float"
},
"revenue": {
"type": "keyword"
},
"runtime": {
"type": "keyword"
},
"title_suggest": {
"type": "completion",
"analyzer": "simple",
"preserve_separators": true,
"preserve_position_increments": true,
"max_input_length": 50
},
"votes": {
"type": "long"
},
"year": {
"type": "long"
},
"avatar": {
"type": "keyword"
},
"certificate": {
"type": "keyword"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment