xxxxxxxxxxPOST subscription_list/_doc{ "name": "First customer", "e-mail": "first-customer@icloud.com", "age": 31}
POST subscription_list/_doc{ "name": "Second customer", "e-mail": "second-customer@gmail.com", "age": 47}
GET subscription_list/_search
POST subscription_list/_update/hjihwX4BIC3Q38hFeGOa{ "doc": { "e-mail": "first@outlook.com" }}
GET subscription_list/_search
DELETE subscription_list/_doc/hzihwX4BIC3Q38hFhmOI
GET subscription_list/_search


xxxxxxxxxxPUT manufacturer/_doc/1{ "name": "Apple", "revenue": 274515, "country": "United States"}
POST manufacturer/_doc{ "name": "Toyota Group", "revenue": 256721, "country": "Japan"}
PUT manufacturer-2{ "settings": { "number_of_shards": 5, "number_of_replicas": 1 }}
POST _reindex{ "source": { "index": "manufacturer" }, "dest": { "index": "manufacturer-2" }}
DELETE manufacturer
POST _aliases{ "actions": [ { "add": { "index": "manufacturer-2", "alias": "manufacturer" } } ]}
GET manufacturer/_search
xxxxxxxxxxPUT comments{ "mappings": { "properties": { "title": { "type": "text" }, "text": { "type": "text" }, "author": { "type": "text", "fields": { "keyword": { "type": "keyword" } } }, "email": { "type": "text" }, "visible": { "type": "boolean" }, "score": { "type": "float" }, "created": { "type": "date", "format": "yyyy-MM-dd" } } }}xxxxxxxxxxPOST comments/_doc{ "title": "Test comment", "text": "Hello world!", "author": "Hicham Sharp", "email": "hicham@sharp-family.zzz", "visible": true, "score": 12.7, "created": "2022-02-18"}
xxxxxxxxxxPOST reviews/_doc{ "customer_id": 12932123, "email": "tom.k@gmail.com", "title": "8 Ball Pool", "comment": "It is a fun game but sometimes hard to control the cue.", "rating": 4, "date": "2022-02-21T15:29:50+02:00"}
POST reviews/_doc{ "customer_id": 13937931, "email": "jane.f@gmail.com", "title": "8 Ball Pool", "comment": "Cannot download even though it says I purchased.", "rating": 1, "date": "2022-02-18T12:22:40+02:00"}
POST reviews/_doc{ "customer_id": 13937931, "email": "jane.f@gmail.com", "title": "Yes Chef!", "comment": "Love it!", "rating": 5, "date": "2022-02-18T11:13:34+02:00"}
POST reviews/_doc{ "customer_id": 13937931, "email": "emanuel.s@yahoo.com", "title": "Barcode Scanner", "comment": "Works as expected.", "rating": 3, "date": "2022-02-12T08:12:32+02:00"}
POST reviews/_doc{ "customer_id": 12932123, "email": "tom.r@gmail.com", "title": "Catch the Ball", "comment": "This is fun too play. I absolutely love it!", "date": "2022-02-10T19:19:51+02:00"}title: Ballcustomer_id >= 12932200 AND email:*gmail.comdate<2022-02-15 AND NOT title:"Barcode Scanner"title: "8 Ball Pool" (or title.keyword:8 Ball Pool)NOT rating:*comment:sometimXes~ (needs to be switched to Lucene query)
xxxxxxxxxxGET reviews/_search{ "query": { "term": { "email.keyword": "emanuel.s@yahoo.com" } }}xxxxxxxxxxGET reviews/_search{ "query": { "range": { "rating": { "gt": 2 } } }}xxxxxxxxxxGET reviews/_search{ "query": { "prefix": { "email.keyword": "tom" } }}xxxxxxxxxxGET reviews/_search{ "query": { "terms": { "title.keyword": [ "8 Ball Pool", "Yes Chef!" ] } }}xxxxxxxxxxGET reviews/_search{ "query": { "bool": { "minimum_should_match": 1, "should": [ { "range": { "rating": { "lt": 5 } } }, { "terms": { "email": [ "tom.k@gmail.com", "jane.f@gmail.com" ] } } ] } }}
xxxxxxxxxxGET reviews/_search{ "query": { "match": { "email": "gmail.com" } }}xxxxxxxxxxGET reviews/_search{ "query": { "multi_match": { "query": "fun ball game", "fields": ["title", "comment"] } }}xxxxxxxxxxGET reviews/_search{ "query": { "bool": { "must": [ { "match": { "title": "ball game" } }, { "range": { "rating": { "gt": 3 } } } ] } }}
xxxxxxxxxxPUT my_em_analyzer{ "settings": { "analysis": { "filter": { "my_synonym": { "type": "synonym", "synonyms": [ "failure=>error" ] }, "english_stop": { "type": "stop", "stopwords": "_english_" }, "english_keywords": { "type": "keyword_marker", "keywords": ["example"] }, "english_stemmer": { "type": "stemmer", "language": "english" }, "english_possessive_stemmer": { "type": "stemmer", "language": "possessive_english" } }, "analyzer": { "rebuilt_english": { "char_filter": [ "html_strip" ], "tokenizer": "standard", "filter": [ "english_possessive_stemmer", "lowercase", "english_stop", "english_keywords", "english_stemmer", "my_synonym" ] } } } }, "mappings": { "properties": { "message": { "type": "text", "analyzer": "rebuilt_english" } } }}
POST my_em_analyzer/_doc{ "message": "An error occured"}
POST my_em_analyzer/_doc{ "message": "There was a failure during processing request"}
GET my_em_analyzer/_search{ "query": { "match": { "message": "error" } }}
xxxxxxxxxxPOST book/_doc{ "title": "The Forever Dog", "publish": "2020-01-20"}
POST book/_doc{ "title": "The Book Your Dog Wishes", "publish": "2018-01-01"}
POST book/_doc{ "title": "The Complete Dog Breed Book", "publish": "2018-01-01"}
GET book/_search{ "query": { "match": { "title": "Dog" } }, "sort": [ { "publish": "asc" }, { "title.keyword": "asc" } ], "highlight": { "fields": { "title": { "pre_tags": "<b>", "post_tags": "</b>" } } }}
xxxxxxxxxxGET kibana_sample_data_ecommerce/_search{ "size": 0, "aggs": { "email_addresses": { "terms": { "field": "email" } } }}
GET kibana_sample_data_ecommerce/_search{ "size": 0, "aggs": { "days": { "terms": { "field": "day_of_week" }, "aggs": { "avg_price": { "avg": { "field": "taxful_total_price" } } } } }}
GET kibana_sample_data_ecommerce/_search{ "query": { "term": { "geoip.continent_name": { "value": "North America" } } }, "size": 0, "aggs": { "gender": { "terms": { "field": "customer_gender" }, "aggs": { "avg_products_count": { "avg": { "field": "total_unique_products" } } } } }}