Created
April 21, 2011 15:23
-
-
Save monken/934765 to your computer and use it in GitHub Desktop.
camelcase tokenizer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XDELETE localhost:9200/test | |
curl -XPUT localhost:9200/test -d ' | |
{ | |
"settings":{ | |
"analysis": { | |
"analyzer": { | |
"camel":{ | |
"type": "pattern", | |
"lowercase": false, | |
"pattern":"(\\W+)|(?<=[a-z])(?=[A-Z])|(?<=[A-Z])(?=[A-Z])" | |
} | |
} | |
} | |
} | |
}' | |
curl localhost:9200/test/_analyze?analyzer=camel -d 'MooseX::ClassAttribute' | |
# returns Moose X Class Attribute |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment