Skip to content

Instantly share code, notes, and snippets.

@aayush2610
Last active February 4, 2019 12:35
Show Gist options
  • Save aayush2610/f8e8ee3f6937fdaf6e94c74ff45ae498 to your computer and use it in GitHub Desktop.
Save aayush2610/f8e8ee3f6937fdaf6e94c74ff45ae498 to your computer and use it in GitHub Desktop.
//Every query goes through this analyzer
"search_analyzer": {
"type": "custom",
"tokenizer": "standard",
"char_filter": [
"ampersand",
],
"filter": [
"lowercase",
"asciifolding",
"snowball_stemmer"
]
}
//converts '&' to 'and'
"char_filter": {
"ampersand": {
"type": "pattern_replace",
"pattern": "\\s*&\\s*",
"replacement": " and "
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment