Skip to content

Instantly share code, notes, and snippets.

@ianAndrewClark
Created August 25, 2011 15:55
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save ianAndrewClark/1171014 to your computer and use it in GitHub Desktop.
Save ianAndrewClark/1171014 to your computer and use it in GitHub Desktop.
location mapping, with settings
{
"mappings": {
"locations": {
"properties": {
"recordId": {
"type": "long"
},
"namePlain": {
"type": "string",
"store": "no",
"analyzer": "plainAnalyzer"
},
"nameSounds": {
"type": "string",
"store": "no",
"analyzer": "soundsAnalyzer"
},
"location": {
"type": "geo_point"
}
}
}
},
"settings": {
"index": {
"number_of_shards": 6,
"number_of_replicas": 1
},
"analysis": {
"filter": {
"soundsFilter": {
"type": "phonetic",
"encoder": "double_metaphone",
"replace": true
}
},
"analyzer": {
"soundsAnalyzer": {
"tokenizer": "standard",
"filter": [
"standard",
"lowercase",
"soundsFilter"
]
},
"plainAnalyzer": {
"type": "standard",
"stopwords": "_none_"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment