Skip to content

Instantly share code, notes, and snippets.

@monken
Created March 10, 2011 18:14
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 monken/864574 to your computer and use it in GitHub Desktop.
Save monken/864574 to your computer and use it in GitHub Desktop.
# this doesn't work
curl -XDELETE http://localhost:9200/cpan
curl -XPUT http://localhost:9200/cpan -d '
{"analysis":{"analyzer":{"lowercase":{"filter":"lowercase","tokenizer":"keyword"}}},
"mappings":{"twitter":{"properties":{"name":{"type":"string","analyzer":"lowercase"}}}}}
'
# while this does:
curl -XDELETE http://localhost:9200/cpan
curl -XPUT http://localhost:9200/cpan -d '
{"analysis":{"analyzer":{"lowercase":{"filter":"lowercase","tokenizer":"keyword"}}}}
'
curl -XPUT http://localhost:9200/cpan/_mapping -d '
{"twitter":{"properties":{"name":{"type":"string","analyzer":"lowercase"}}}}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment