Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
camelcase tokenizer
curl -XDELETE localhost:9200/test
curl -XPUT 'localhost:9200/test?pretty=1' -d '
{
"settings":{
"analysis": {
"analyzer": {
"camel":{
"type": "pattern",
"lowercase": true,
"pattern":"([^\\p{L}\\d]+)|(?<=\\D)(?=\\d)|(?<=\\d)(?=\\D)|(?<=[\\p{L}&&[^\\p{Lu}]])(?=\\p{Lu})|(?<=\\p{Lu})(?=\\p{Lu}[\\p{L}&&[^\\p{Lu}]])"
}
}
}
}
}'
curl 'localhost:9200/test/_analyze?pretty=1&analyzer=camel' -d 'MooseX::FTPClass foo_bar123Baz'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment