Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save VictorTpo/7e95aef085243cfd650828340bc0fe8e to your computer and use it in GitHub Desktop.
Save VictorTpo/7e95aef085243cfd650828340bc0fe8e to your computer and use it in GitHub Desktop.
ES : normalizer + mapping
GET staging_influence_v2/_settings
POST staging_influence_v2/_close
POST staging_influence_v2/_open
PUT staging_influence_v2/_settings
{
"analysis": {
"normalizer": {
"username_normalizer": {
"type": "custom",
"filter": ["lowercase"]
}
}
}
}
PUT staging_influence_v2/accounts/_mapping
{
"_routing": {
"required": true
},
"_parent": {
"type": "profiles"
},
"properties": {
"username": {
"type": "text",
"fields": {
"exact": {
"type": "keyword",
"normalizer": "username_normalizer"
}
}
},
"identifiers.usernames": {
"type": "text",
"fields": {
"exact": {
"type": "keyword",
"normalizer": "username_normalizer"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment