Skip to content

Instantly share code, notes, and snippets.

View Nidhig631's full-sized avatar
🏠
Working from home

Nidhi Gupta Nidhig631

🏠
Working from home
View GitHub Profile
PUT /orders/_alias/order
POST /_reindex
{
"source": {
"index": "orders"
},
"dest": {
"index": "order"
}
}
GET /order/_search
Output:
{
"took" : 3,
"timed_out" : false,
"_shards" : {
"total" : 1,
"successful" : 1,
PUT /order
{
"mappings": {
"properties": {
"lines": {
"properties": {
"amount": {
"type": "float"
},
"product_id": {
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
CREATE DATABASE [medium];
USE [medium];
@Nidhig631
Nidhig631 / CRUD.json
Last active September 27, 2021 13:34
Elasticsearch-CRUD
// 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"
},