Skip to content

Instantly share code, notes, and snippets.

Created February 12, 2017 07:09
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 anonymous/f6f3067b02af50928751127a1e351e63 to your computer and use it in GitHub Desktop.
Save anonymous/f6f3067b02af50928751127a1e351e63 to your computer and use it in GitHub Desktop.
PUT categories
{
"settings": {
"analysis": {
"analyzer": {
"compound": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"myTokenFilter1"
]
}
},
"filter": {
"myTokenFilter1": {
"type": "dictionary_decompounder",
"word_list": "[verlichting]"
}
}
}
},
"mappings": {
"category": {
"properties": {
"name": {
"fields": {
"default": {
"type": "text",
"analyzer": "standard"
},
"compound": {
"type": "text",
"analyzer": "compound"
}
},
"type": "text"
}
}
}
}
}
PUT /categories/category/1
{
"name": "stadsverlichting"
}
POST categories/_search
{
"query": {
"match": {
"name.compound": "verlichting"
}
},
"explain": true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment