Skip to content

Instantly share code, notes, and snippets.

@kcleong
Created February 2, 2018 10:33
Show Gist options
  • Save kcleong/032783a4c9517e407d3b65bb4aca04d6 to your computer and use it in GitHub Desktop.
Save kcleong/032783a4c9517e407d3b65bb4aca04d6 to your computer and use it in GitHub Desktop.
DELETE plone
PUT plone
POST plone/_close
PUT plone/_settings
{
"settings": {
"analysis": {
"filter": {
"dutch_stop": {
"type": "stop",
"stopwords": "_dutch_"
},
"dutch_kp_stemmer": {
"type": "stemmer",
"language": "dutch_kp"
},
"dutch_override": {
"type": "stemmer_override",
"rules": [
"calamiteiten=>calamiteit",
"calamiteit=>calamiteit",
]
}
},
"analyzer": {
"custom_dutch": {
"type": "custom",
"tokenizer": "standard",
"filter": [
"lowercase",
"dutch_stop",
"dutch_override",
"dutch_kp_stemmer"
]
}
}
}
}
}
POST plone/_open
GET plone/_settings
GET plone/_analyze
{
"analyzer" : "custom_dutch",
"text" : "de artikeltje met vele calamiteiten, en grote zaken met calamiteit. scholen"
}
GET plone/_analyze
{
"analyzer" : "custom_dutch",
"text" : "scholen, gelezen artikelen. activiteiten"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment