-
-
Save imotov/b01e8706948d2bd2c943 to your computer and use it in GitHub Desktop.
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/my_proto | |
echo | |
curl -XPUT localhost:9200/my_proto -d '{ | |
"mappings": { | |
"some_type": { | |
}, | |
"chow-clfg": { | |
"_parent": { | |
"type": "some_type" | |
} | |
} | |
} | |
}' | |
echo | |
curl -XPUT 'localhost:9200/my_proto/chow-clfg/Nx4JcvyxTPujkyy0Jq5BNw?parent=12345' -d '{ | |
"chow-clfg": { | |
"count": 1 | |
} | |
}' | |
echo | |
curl -XPOST 'localhost:9200/my_proto/chow-clfg/Nx4JcvyxTPujkyy0Jq5BNw/_update?parent=12345' -d '{ | |
"script":"ctx._source[\"chow-clfg\"].count+=num", | |
"params":{"num":1} | |
}' | |
echo | |
curl -XGET 'localhost:9200/my_proto/chow-clfg/Nx4JcvyxTPujkyy0Jq5BNw?routing=12345&pretty=true' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment