This file contains hidden or 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
| PUT /orders/_alias/order |
This file contains hidden or 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
| POST /_reindex | |
| { | |
| "source": { | |
| "index": "orders" | |
| }, | |
| "dest": { | |
| "index": "order" | |
| } | |
| } |
This file contains hidden or 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
| GET /order/_search | |
| Output: | |
| { | |
| "took" : 3, | |
| "timed_out" : false, | |
| "_shards" : { | |
| "total" : 1, | |
| "successful" : 1, |
This file contains hidden or 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
| PUT /order | |
| { | |
| "mappings": { | |
| "properties": { | |
| "lines": { | |
| "properties": { | |
| "amount": { | |
| "type": "float" | |
| }, | |
| "product_id": { |
This file contains hidden or 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
| CREATE EXTENSION pg_freespacemap; | |
| CREATE TABLE medm | |
| ( mid int, | |
| did int | |
| ); | |
| INSERT INTO medm VALUES(generate_series(1,50),generate_series(1,50)); | |
| INSERT 50 |
This file contains hidden or 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
| CREATE DATABASE [medium]; | |
| USE [medium]; | |
This file contains hidden or 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
| // Creating an index named recipes with their explicit mappings. | |
| PUT /recipes | |
| { | |
| "mappings" : { | |
| "properties" : { | |
| "created" : { | |
| "type" : "date", | |
| "format" : "yyyy/MM/dd HH:mm:ss||yyyy/MM/dd||epoch_millis" | |
| }, |