Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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