Skip to content

Instantly share code, notes, and snippets.

View rxhl's full-sized avatar
❄️
Handmade Heaven

Rahul Sharma rxhl

❄️
Handmade Heaven
View GitHub Profile
@rxhl
rxhl / docker-help.md
Created January 27, 2019 00:47 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

POST apple/default/1
{
"brand": "Apple",
"item": "iPhone X",
"capacity": "64 GB",
"price": "999.99",
"description": "iPhone X is a smartphone designed, developed, and marketed by Apple Inc. It was the eleventh generation of the iPhone. It was announced on September 12, 2017, alongside the iPhone 8 and iPhone 8 Plus, at the Steve Jobs Theater in the Apple Park campus. The phone was released on November 3, 2017, marking the iPhone series' tenth anniversary."
}
POST apple/default/2
{
"name": "iPhone XS Max",
"description": "Apple iPhone XS Max with 128 GB of memory, priced at $1199.99."
}
POST apple/default/
{
"brand": "Apple",
"item": "Airpods",
"capacity": null,
"price": "159.99",
"description": "Now with more talk time, voice-activated Siri access — and a new wireless charging case — AirPods deliver an unparalleled wireless headphone experience. Simply take them out and they're ready to use with all your devices. Put them in your ears and they connect immediately, immersing you in rich, high-quality sound."
}
curl -k -H "Content-Type: application/json" -XPOST --user <username>:<password> "https://<your_elastic_instance_url>:<PORT>/apple/default/_bulk?pretty" --data-binary "@apple.json"
GET apple/default/_search
{
"query": {
"match": {
"item": "airpods"
}
}
}
{
"brand": "Apple"
"item": "Airpods",
"capacity": null,
"price": "159.99",
"description": "Now with more talk time, voice-activated Siri access — and a new wireless charging case — AirPods deliver an unparalleled wireless headphone experience. Simply take them out and they're ready to use with all your devices. Put them in your ears and they connect immediately, immersing you in rich, high-quality sound."
}
PUT apple
{
"mappings": {
"default": {
"dynamic": false,
"properties": {
"price": {
"type": "integer"
}
}
GET apple/default/_search
{
"query": {
"term": {
"item": "airpods"
}
}
}
GET apple/default/_search
{
"query": {
"terms": {
"item": [
"iphone",
"airpods"
]
}
}