Created
May 6, 2013 21:21
-
-
Save dakrone/5528298 to your computer and use it in GitHub Desktop.
broken get for integer arrays
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
#!/usr/bin/env zsh | |
curl -XDELETE localhost:9200/get-test | |
curl -XPOST 'localhost:9200/get-test' -d' | |
{ | |
"mappings": { | |
"doc": { | |
"_source": { | |
"enabled": true | |
}, | |
"properties": { | |
"num": { | |
"type": "integer" | |
} | |
} | |
} | |
}, | |
"settings": { | |
"number_of_replicas": 0, | |
"number_of_shards": 1 | |
} | |
}' | |
echo | |
curl -XPOST 'localhost:9200/get-test/doc/1' -d'{"num":2}' | |
echo | |
curl -XPOST 'localhost:9200/get-test/doc/2' -d'{"num":[2,1]}' | |
echo | |
curl 'localhost:9200/get-test/doc/1?pretty' | |
echo | |
curl 'localhost:9200/get-test/doc/2?pretty' | |
echo | |
# broken | |
curl 'localhost:9200/get-test/doc/2?fields=num&pretty' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment