Skip to content

Instantly share code, notes, and snippets.

@yellow1912
Created June 6, 2014 11:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yellow1912/b272ca6b6c88bdfb243c to your computer and use it in GitHub Desktop.
Save yellow1912/b272ca6b6c88bdfb243c to your computer and use it in GitHub Desktop.
DELETE myindex
PUT myindex
{
"settings": {
"analysis": {
"analyzer": {
"lowercase": {
"tokenizer": "keyword",
"filter": ["lowercase"]
},
"default" : {
"tokenizer" : "standard",
"filter" : ["lowercase","standard", "asciifolding"]
}
}
}
},
"mappings": {
"product": {
"properties" : {
"name":
{
"type": "string",
"fields": {
"raw": { "type": "string", "analyzer": "lowercase" }
},
"analyzer": "default"
},
"options" : {
"type": "nested",
"properties": {
"values" : {
"type" : "string",
"index_name" : "value"
}
}
},
"price":{"type": "integer"},
"createdAt": {
"type": "date",
"format": "basic_date_time"
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment