Skip to content

Instantly share code, notes, and snippets.

@YannBrrd
Last active January 1, 2016 14:59
Show Gist options
  • Save YannBrrd/8161620 to your computer and use it in GitHub Desktop.
Save YannBrrd/8161620 to your computer and use it in GitHub Desktop.
Basic multifiled mapping for deduplication & search
curl -XPUT 'http://localhost:9200/product/' -d '{
"settings" : {
"number_of_shards" : 5,
"number_of_replicas" : 0
},
"mappings": {
"product_type": {
"dynamic_templates": [
{
"strings": {
"match": "*",
"match_mapping_type": "string",
"mapping": {
"type" : "string",
"fields" : {
"raw" : {"type" : "string", "index" : "not_analyzed"}
}
}
}
}
]
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment