por id
http://10.10.16.90:9200/prod-man.access/v1/Gxc_HW4BAXIIB-1uKgC0
{
"route": "product_delete_content_filter",
"clients": [
"adm-cv",
"adm-cm",
"adm-netflex"
]
}
hay que enviar todos los campos
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
{ "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.
elasticsearch listar todos los registros
GET http://10.10.16.90:9200/prod-man.access/v1/_search
{ "query": { "match_all": {} } }
{ "query": { "match_all": {} } }
elasticsearch agregar registro
para agregar registro
{
"route":"product_get_all",
"clients":["adm-cv","adm-cm"," adm-netflex"]
}
"route":"product_get_all",
"clients":["adm-cv","adm-cm","
}
el _id, lo genera aleatoriamente.
si se quiere enviar tambien el ID, se lo debe agregar al final de la URL
elasticsearch obtener por id
GET url:9200/indice/tipo_doc/id
para borrar un registro:
DELETE url:9200/indice/tipo_doc/i
para borrar un registro:
DELETE url:9200/indice/tipo_doc/i
elasticsearch busqueda
por default devuelve solo 10 registros
GET http://10.10.16.90:9200/xxx.indice/_search
{ "from" : 0, "size" : 100, "query": { "bool": { "filter": [ } } }
--------------
{ "query": { "term": { "route": "regions_get_all" } } }
GET http://10.10.16.90:9200/xxx.indice/_search
{ "from" : 0, "size" : 100, "query": { "bool": { "filter": [ } } }
--------------
{ "query": { "term": { "route": "regions_get_all" } } }
Suscribirse a:
Entradas (Atom)
linux ubuntu mint actualizar chrome
desde una terminal: $ sudo apt update $ sudo apt install google-chrome-stable
-
por consola y desde la raiz de tu proyecto php artisan --version
-
en nuestro proyecto creamos una carpeta llamada donde estaran todas nuestras clases, por ejemplo una llamada: MiApp adentro de esta irian b...
-
Integridad al nivel de la base de datos Oracle Oracle valida la integridad de la base de datos y presenta los siguientes mensajes de erro...