Skip to content

Instantly share code, notes, and snippets.

@drusellers
Created March 15, 2019 15:29
Show Gist options
  • Save drusellers/4503bffdfe86c25340f4a52c23c39e67 to your computer and use it in GitHub Desktop.
Save drusellers/4503bffdfe86c25340f4a52c23c39e67 to your computer and use it in GitHub Desktop.
Type Ahead Blog Post - Edgegram Updates
{
"mappings": {
"_doc": {
"properties": {
"name" : {
"type" : "text",
"analyzer": "fuzzy_analysis"
},
"handles": {
"type": "text",
"analyzer": "fuzzy_analysis"
}
}
}
},
"settings": {
"index" : {
"number_of_shards" : 1,
"number_of_replicas" : 0
},
"analysis": {
"analyzer": {
"fuzzy_analysis": {
"tokenizer": "fuzzy",
"filter": ["lowercase"]
}
},
"tokenizer": {
"fuzzy": {
"type": "edge_ngram",
"min_gram": 2,
"max_gram": 10,
"token_chars": ["letter"]
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment