Skip to content

Instantly share code, notes, and snippets.

@polyfractal
Last active January 3, 2016 04:29
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 polyfractal/8409633 to your computer and use it in GitHub Desktop.
Save polyfractal/8409633 to your computer and use it in GitHub Desktop.
curl -XPUT "http://localhost:9200/test" -d'
{
"mappings": {
"test" : {
"properties": {
"arrayfield" : {
"type": "string"
}
}
}
}
}'
curl -XPUT "http://localhost:9200/test/test/1" -d'
{
"arrayfield" : ["a", "b", "c"]
}'
curl -XGET "http://localhost:9200/test/test/1"
curl -XGET "http://localhost:9200/test/test/_search" -d'
{
"query": {
"match": {
"arrayfield": "b"
}
}
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment