elasticsearch insertar varios registros a la vez

post http://10.10.16.90:9200/prod-man.access/_bulk

{ "index": { "_index": "prod-man.access", "_type": "v1" } }
{  "route":"product_get",  "clients":["adm-cv","adm-cm","adm-netflex"]}
{ "index": { "_index": "prod-man.access", "_type": "v1" } }
{  "route":"product_store",  "clients":["adm-cv","adm-cm","adm-netflex"]}
{ "index": { "_index": "prod-man.access", "_type": "v1" } }
{  "route":"product_update",  "clients":["adm-cv","adm-cm","adm-netflex"]}
{ "index": { "_index": "prod-man.access", "_type": "v1" } }
{  "route":"product_add_content_filter",  "clients":["adm-cv","adm-cm","adm-netflex"]}
{ "index": { "_index": "prod-man.access", "_type": "v1" } }
{  "route":"product_delete_content_filter",  "clients":["adm-cv","adm-cm","adm-netflex"]}
{ "index": { "_index": "prod-man.access", "_type": "v1" } }
{  "route":"product_delete",  "clients":["adm-cv","adm-cm","adm-netflex"]}

al final dejar una linea en blanco

POST: ENDPOINT/shirts/_bulk
{ "index": { "_index": "shirts", "_type": "shirt" } }
{ "name": "tshirt", "size": "M", "color": "black", "fabric": "cotton", price": 1000 }
{ "index": { "_index": "shirts", "_type": "shirt" } }
{ "name": "tshirt", "size": "L", "color": "black", "fabric": "cotton", "price": 1000 }
...
Observations:
  • Each row is a complete JSON entry; cannot be multi-line
  • Each row (including the last one) needs to be terminated with a new line.

No hay comentarios:

Publicar un comentario

linux ubuntu mint actualizar chrome

 desde una terminal: $ sudo apt update $ sudo apt install google-chrome-stable