Skip to content

Instantly share code, notes, and snippets.

@Bek
Last active April 5, 2016 19:19
Show Gist options
  • Save Bek/d96bd0f67dff06dcf5e6e0877bebb6d1 to your computer and use it in GitHub Desktop.
Save Bek/d96bd0f67dff06dcf5e6e0877bebb6d1 to your computer and use it in GitHub Desktop.
Elasticsearch not_analyzed still gets analyzed when included in _all
curl -XDELETE 'http://localhost:9200/test'
echo
curl -XPUT 'http://localhost:9200/test'
echo
echo
curl -XPUT 'http://localhost:9200/test/_mapping/message' -d '
{
"message" : {
"properties" : {
"message" : {"type" : "string", "store" : "true" },
"uuid" : { "type": "string",
"index":"not_analyzed"
}
}
}
}'
echo
echo
curl -XPUT 'http://localhost:9200/test/message/1?pretty' -d '
{
"text": "Hello, World!",
"uuid": "956dd3ea-e7ad-4d6f-aacd-dfac1ffdaff6"
}'
echo
sleep 1
echo
curl -XGET 'http://localhost:9200/test/message/_search?q=956dd3ea-e7ad-4d6f-aacd-dfac1ffdaff6&pretty=true'
echo
curl -XGET 'http://localhost:9200/test/message/_search?q=956dd3ea&pretty=true'
echo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment