Elasticsearch
Index and search Elasticsearch and OpenSearch: documents, bulk insert of rows, query DSL, find as rows, scroll export, update or delete by filter, SQL. Typical uses: feed a search index, export search results to a report.
elastic pingelastic infoelastic healthelastic collection_createelastic collection_createelastic collection_existselastic insertelastic insertelastic collectionselastic collectionselastic collectionselastic collection_infoelastic collection_infoelastic refreshelastic putelastic putelastic getelastic getelastic update_idelastic update_idelastic findelastic findelastic searchelastic searchelastic countelastic countelastic updateelastic updateelastic search_allelastic search_allelastic queryelastic queryelastic delete_whereelastic delete_whereelastic deleteelastic deleteelastic requestelastic requestelastic collection_drop
elastic ping <config>
Description
Test the connection and the authentication: {ok, distribution, version}
Test the connection and the authentication: {ok, distribution, version}
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
admin
elastic ping "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}"
mentdb
{"ok": true, "distribution": "elasticsearch", "version": "9.5.6"}
elastic info <config>
Description
The server: {distribution (elasticsearch or opensearch), version, cluster_name, node_name, lucene_version, build_flavor}
The server: {distribution (elasticsearch or opensearch), version, cluster_name, node_name, lucene_version, build_flavor}
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
admin
elastic info "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}"
mentdb
{"distribution": "elasticsearch", "version": "9.5.6", "cluster_name": "elasticsearch", "node_name": "node-1", "lucene_version": "10.5.2", "build_flavor": "default"}
elastic health <config>
Description
The health of the cluster as given by _cluster/health (status green, yellow or red, nodes, shards)
The health of the cluster as given by _cluster/health (status green, yellow or red, nodes, shards)
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
admin
elastic health "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}"
mentdb
{"cluster_name": "elasticsearch", "status": "green", "timed_out": false, "number_of_nodes": 1, "number_of_data_nodes": 1, "active_primary_shards": 3, "active_shards": 3, "relocating_shards": 0, "initializing_shards": 0, "unassigned_shards": 0, "unassigned_primary_shards": 0, "delayed_unassigned_shards": 0, "number_of_pending_tasks": 0, "number_of_in_flight_fetch": 0, "task_max_waiting_in_queue_millis": 0, "active_shards_percent_as_number": 100}
elastic collection_create <config> <name>
Description
Create an index with the default settings. Returns {created, acknowledged}
Create an index with the default settings. Returns {created, acknowledged}
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
name: The index name (lowercase) - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
name: The index name (lowercase) - String - required
admin
elastic collection_create "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "logs-test"
mentdb
{"created": "logs-test", "acknowledged": true}
elastic collection_create <config> <name> <options_json>
Description
Create an index with options: settings, mappings, aliases
Create an index with options: settings, mappings, aliases
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
name: The index name - String - required
options_json: The settings, mappings and aliases - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
name: The index name - String - required
options_json: The settings, mappings and aliases - String - required
admin
elastic collection_create "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"settings\": {\"number_of_replicas\": 0}, \"mappings\": {\"properties\": {\"title\": {\"type\": \"text\"}, \"author\": {\"type\": \"keyword\"}, \"year\": {\"type\": \"integer\"}, \"price\": {\"type\": \"float\"}}}}"
mentdb
{"created": "books", "acknowledged": true}
elastic collection_exists <config> <index>
Description
Whether an index, an alias or a pattern exists: 1 or 0
Whether an index, an alias or a pattern exists: 1 or 0
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
admin
elastic collection_exists "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books"
mentdb
1
no such index (fixed result: real Elasticsearch 9.5.6)
admin
elastic collection_exists "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "nothing"
mentdb
0
elastic insert <config> <index> <rows_json>
Description
Insert MQL rows with the bulk API, by batches of 1000 rows: ids generated by the server. Returns {inserted, error_count, errors}: the errors per row (100 detailed) do not stop the other rows; a row without a result in the answer counts as an error; a failed batch stops the call with the number of rows already written
Insert MQL rows with the bulk API, by batches of 1000 rows: ids generated by the server. Returns {inserted, error_count, errors}: the errors per row (100 detailed) do not stop the other rows; a row without a result in the answer counts as an error; a failed batch stops the call with the number of rows already written
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
rows_json: The MQL rows: a JSON array of objects - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
rows_json: The MQL rows: a JSON array of objects - String - required
admin
elastic insert "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "logs-test" "[{\"level\": \"info\", \"msg\": \"start\"}, {\"level\": \"error\", \"msg\": \"disk full\"}]"
mentdb
{"inserted": 2, "error_count": 0, "errors": []}
elastic insert <config> <index> <rows_json> <options_json>
Description
Insert with options: id_field (the field which gives the _id), keep_id_field (true), op (index, create, update, upsert, delete; update, upsert and delete need id_field), refresh (true, false or wait_for), batch_size (1000, 10000 at most), routing, pipeline
Insert with options: id_field (the field which gives the _id), keep_id_field (true), op (index, create, update, upsert, delete; update, upsert and delete need id_field), refresh (true, false or wait_for), batch_size (1000, 10000 at most), routing, pipeline
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
rows_json: The MQL rows: a JSON array of objects - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
rows_json: The MQL rows: a JSON array of objects - String - required
options_json: The options - String - required
admin
elastic insert "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "[{\"id\": 1, \"title\": \"Les Misérables\", \"author\": \"Hugo\", \"year\": 1862, \"price\": 12.5}, {\"id\": 2, \"title\": \"Notre-Dame de Paris\", \"author\": \"Hugo\", \"year\": 1831, \"price\": 9.9}, {\"id\": 3, \"title\": \"Madame Bovary\", \"author\": \"Flaubert\", \"year\": 1857, \"price\": 7.2}, {\"id\": 4, \"title\": \"Germinal\", \"author\": \"Zola\", \"year\": 1885, \"price\": 8.4}]" "{\"id_field\": \"id\", \"refresh\": \"wait_for\"}"
mentdb
{"inserted": 4, "error_count": 0, "errors": []}
a row in error (a text in an integer field) (fixed result: real Elasticsearch 9.5.6)
admin
elastic insert "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "[{\"id\": 5, \"title\": \"Nana\", \"year\": \"unknown\"}]" "{\"id_field\": \"id\"}"
mentdb
{"inserted": 0, "error_count": 1, "errors": [{"row": 1, "_id": "5", "status": 400, "error": "document_parsing_exception: [1:36] failed to parse field [year] of type [integer] in document with id '5'. Preview of field's value: 'unknown'"}]}
elastic collections <config>
Description
The names of the indices, without the hidden ones (. at the beginning)
The names of the indices, without the hidden ones (. at the beginning)
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
admin
elastic collections "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}"
mentdb
["books", "logs-test"]
elastic collections <config> <pattern>
Description
The names of the indices of a pattern
The names of the indices of a pattern
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
pattern: The pattern, like logs-* - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
pattern: The pattern, like logs-* - String - required
admin
elastic collections "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "logs-*"
mentdb
["logs-test"]
elastic collections <config> <pattern> <options_json>
Description
The indices with options: hidden (true: the system and hidden indices too), details (true: rows {index, health, status, docs, bytes, primaries, replicas})
The indices with options: hidden (true: the system and hidden indices too), details (true: rows {index, health, status, docs, bytes, primaries, replicas})
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
pattern: The pattern - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
pattern: The pattern - String - required
options_json: The options - String - required
admin
elastic collections "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "*" "{\"details\": true}"
mentdb
[{"index": "books", "health": "green", "status": "open", "docs": 4, "bytes": 6974, "primaries": 1, "replicas": 0}, {"index": "logs-test", "health": "yellow", "status": "open", "docs": 2, "bytes": 6509, "primaries": 1, "replicas": 1}]
elastic collection_info <config> <index>
Description
An index: {name, docs, fields (rows {field with dots for the objects and the multi-fields, type}), aliases, settings}; a pattern of several indices gives an object by name (100 indices at most)
An index: {name, docs, fields (rows {field with dots for the objects and the multi-fields, type}), aliases, settings}; a pattern of several indices gives an object by name (100 indices at most)
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
admin
elastic collection_info "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books"
mentdb
{"name": "books", "docs": 4, "fields": [{"field": "author", "type": "keyword"}, {"field": "id", "type": "long"}, {"field": "price", "type": "float"}, {"field": "title", "type": "text"}, {"field": "year", "type": "integer"}], "aliases": [], "settings": {"routing": {"allocation": {"include": {"_tier_preference": "data_content"}}}, "number_of_shards": "1", "provided_name": "books", "creation_date": "1794914643196", "number_of_replicas": "0", "uuid": "-1NYb5ZLSIS6BBX0NTB2fA", "version": {"created": "9111002"}}}
elastic collection_info <config> <index> <options_json>
Description
An index with options: raw (true: the answer of GET /index)
An index with options: raw (true: the answer of GET /index)
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
options_json: The options - String - required
admin
elastic collection_info "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "logs-test" "{\"raw\": true}"
mentdb
{"logs-test": {"aliases": {}, "mappings": {"properties": {"level": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256}}}, "msg": {"type": "text", "fields": {"keyword": {"type": "keyword", "ignore_above": 256}}}}}, "settings": {"index": {"routing": {"allocation": {"include": {"_tier_preference": "data_content"}}}, "number_of_shards": "1", "provided_name": "logs-test", "creation_date": "1794914643075", "number_of_replicas": "1", "uuid": "yDdbWP90RX6GBfjoi1A52A", "version": {"created": "9111002"}}}}}
elastic refresh <config> <index>
Description
Refresh an index: the last writes become visible to searches. Returns 1
Refresh an index: the last writes become visible to searches. Returns 1
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
admin
elastic refresh "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "logs-test"
mentdb
1
elastic put <config> <index> <id> <document_json>
Description
Index a document by id (created or replaced; an empty id: generated by the server). Returns {id, result, version}
Index a document by id (created or replaced; an empty id: generated by the server). Returns {id, result, version}
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id, or empty - String - required
document_json: The document as a JSON object - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id, or empty - String - required
document_json: The document as a JSON object - String - required
admin
elastic put "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "10" "{\"title\": \"Candide\", \"author\": \"Voltaire\", \"year\": 1759, \"price\": 4.5}"
mentdb
{"id": "10", "result": "created", "version": 1}
elastic put <config> <index> <id> <document_json> <options_json>
Description
Index a document with options: refresh (true, false, wait_for), create (true: an error if the id exists), routing, pipeline
Index a document with options: refresh (true, false, wait_for), create (true: an error if the id exists), routing, pipeline
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id, or empty - String - required
document_json: The document as a JSON object - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id, or empty - String - required
document_json: The document as a JSON object - String - required
options_json: The options - String - required
admin
elastic put "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "11" "{\"title\": \"Zadig\", \"author\": \"Voltaire\", \"year\": 1747}" "{\"create\": true, \"refresh\": \"true\"}"
mentdb
{"id": "11", "result": "created", "version": 1}
elastic get <config> <index> <id>
Description
A document as a row (_id then the source), null if it does not exist
A document as a row (_id then the source), null if it does not exist
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
id: The id of the document (512 bytes at most) - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
id: The id of the document (512 bytes at most) - String - required
admin
elastic get "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "10"
mentdb
{"_id": "10", "title": "Candide", "author": "Voltaire", "year": 1759, "price": 4.5}
no such id (fixed result: real Elasticsearch 9.5.6)
admin
elastic get "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "999"
mentdb
null
elastic get <config> <index> <id> <options_json>
Description
A document with options: meta (true: _index), routing
A document with options: meta (true: _index), routing
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
id: The id of the document (512 bytes at most) - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
id: The id of the document (512 bytes at most) - String - required
options_json: The options - String - required
admin
elastic get "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "3" "{\"meta\": true}"
mentdb
{"_id": "3", "_index": "books", "id": 3, "title": "Madame Bovary", "author": "Flaubert", "year": 1857, "price": 7.2}
elastic update_id <config> <index> <id> <changes_json>
Description
Partial update of one document by id. Returns {id, result, version}; result noop if nothing changed
Partial update of one document by id. Returns {id, result, version}; result noop if nothing changed
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id of the document (512 bytes at most) - String - required
changes_json: The fields to set, as a JSON object - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id of the document (512 bytes at most) - String - required
changes_json: The fields to set, as a JSON object - String - required
admin
elastic update_id "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "10" "{\"price\": 5.0}"
mentdb
{"id": "10", "result": "updated", "version": 2}
elastic update_id <config> <index> <id> <changes_json> <options_json>
Description
Partial update with options: upsert (true: create the document if absent), refresh, routing, retry_on_conflict (0 to 100)
Partial update with options: upsert (true: create the document if absent), refresh, routing, retry_on_conflict (0 to 100)
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id of the document (512 bytes at most) - String - required
changes_json: The fields to set, as a JSON object - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id of the document (512 bytes at most) - String - required
changes_json: The fields to set, as a JSON object - String - required
options_json: The options - String - required
admin
elastic update_id "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "12" "{\"title\": \"Micromégas\", \"author\": \"Voltaire\", \"year\": 1752}" "{\"upsert\": true, \"refresh\": \"wait_for\"}"
mentdb
{"id": "12", "result": "created", "version": 1}
elastic find <config> <index> <filter_json>
Description
The documents of a filter as rows (10 by default)
The documents of a filter as rows (10 by default)
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
admin
elastic find "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"author\": \"Voltaire\"}"
mentdb
[{"_id": "11", "title": "Zadig", "author": "Voltaire", "year": 1747}, {"_id": "10", "title": "Candide", "author": "Voltaire", "year": 1759, "price": 5}, {"_id": "12", "title": "Micromégas", "author": "Voltaire", "year": 1752}]
elastic find <config> <index> <filter_json> <options_json>
Description
The documents of a filter with options: limit (10, 10000 at most), skip, sort ("year:desc,title"), fields, meta, routing
The documents of a filter with options: limit (10, 10000 at most), skip, sort ("year:desc,title"), fields, meta, routing
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
options_json: The options: limit, skip, sort ("year:desc,title"), fields (a list or "a,b") - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
options_json: The options: limit, skip, sort ("year:desc,title"), fields (a list or "a,b") - String - required
admin
elastic find "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"author\": \"Hugo\"}" "{\"sort\": \"year:asc\", \"fields\": [\"title\", \"year\"]}"
mentdb
[{"_id": "2", "title": "Notre-Dame de Paris", "year": 1831}, {"_id": "1", "title": "Les Misérables", "year": 1862}]
a range clause, a page (fixed result: real Elasticsearch 9.5.6)
admin
elastic find "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"range\": {\"year\": {\"lt\": 1860}}}" "{\"limit\": 2, \"skip\": 1, \"sort\": \"year\", \"fields\": \"title,year\"}"
mentdb
[{"_id": "12", "title": "Micromégas", "year": 1752}, {"_id": "10", "title": "Candide", "year": 1759}]
elastic search <config> <index> <json_query>
Description
Search with the query DSL: the hits as rows (_id, _score, then the fields of the source)
Search with the query DSL: the hits as rows (_id, _score, then the fields of the source)
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
json_query: The body of the search in the query DSL: query, size, from, sort, _source, aggs, highlight... ({} or empty: all the documents, 10 hits by default) - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
json_query: The body of the search in the query DSL: query, size, from, sort, _source, aggs, highlight... ({} or empty: all the documents, 10 hits by default) - String - required
admin
elastic search "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"query\": {\"match\": {\"title\": \"paris\"}}, \"_source\": [\"title\"]}"
mentdb
[{"_id": "2", "_score": 1.1213198, "title": "Notre-Dame de Paris"}]
a bool query with a sort (fixed result: real Elasticsearch 9.5.6)
admin
elastic search "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"query\": {\"bool\": {\"filter\": [{\"term\": {\"author\": \"Hugo\"}}]}}, \"sort\": [{\"year\": \"asc\"}], \"_source\": [\"title\", \"year\"]}"
mentdb
[{"_id": "2", "_score": null, "title": "Notre-Dame de Paris", "year": 1831}, {"_id": "1", "_score": null, "title": "Les Misérables", "year": 1862}]
elastic search <config> <index> <json_query> <options_json>
Description
Search with options: full (true: {total, total_relation, took_ms, timed_out, max_score, rows, aggregations}), meta (true: _index and _sort in each row), routing
Search with options: full (true: {total, total_relation, took_ms, timed_out, max_score, rows, aggregations}), meta (true: _index and _sort in each row), routing
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
json_query: The body of the search in the query DSL: query, size, from, sort, _source, aggs, highlight... ({} or empty: all the documents, 10 hits by default) - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
json_query: The body of the search in the query DSL: query, size, from, sort, _source, aggs, highlight... ({} or empty: all the documents, 10 hits by default) - String - required
options_json: The options - String - required
admin
elastic search "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"size\": 0, \"aggs\": {\"by_author\": {\"terms\": {\"field\": \"author\"}}, \"avg_price\": {\"avg\": {\"field\": \"price\"}}}}" "{\"full\": true}"
mentdb
{"total": 7, "total_relation": "eq", "took_ms": 3, "timed_out": false, "max_score": null, "rows": [], "aggregations": {"by_author": {"doc_count_error_upper_bound": 0, "sum_other_doc_count": 0, "buckets": [{"key": "Voltaire", "doc_count": 3}, {"key": "Hugo", "doc_count": 2}, {"key": "Flaubert", "doc_count": 1}, {"key": "Zola", "doc_count": 1}]}, "avg_price": {"value": 8.599999809265137}}}
a highlight (fixed result: real Elasticsearch 9.5.6)
admin
elastic search "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"query\": {\"match\": {\"title\": \"madame\"}}, \"_source\": [\"title\"], \"highlight\": {\"fields\": {\"title\": {}}}}" "{\"meta\": true}"
mentdb
[{"_id": "3", "_score": 1.6371987, "_index": "books", "title": "Madame Bovary", "_highlight": {"title": ["<em>Madame</em> Bovary"]}}]
elastic count <config> <index>
Description
The number of documents of an index
The number of documents of an index
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
admin
elastic count "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books"
mentdb
7
elastic count <config> <index> <filter_json>
Description
The number of documents of a filter
The number of documents of a filter
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
admin
elastic count "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"author\": [\"Hugo\", \"Zola\"]}"
mentdb
3
a range (fixed result: real Elasticsearch 9.5.6)
admin
elastic count "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"range\": {\"year\": {\"lt\": 1860}}}"
mentdb
5
elastic update <config> <index> <filter_json> <changes_json>
Description
Set fields on the documents of a filter (update by query with a Painless script). A key with dots is a path in nested objects, created when absent ({"address.city": "Paris"}). The target cannot hold *, ?, _all or a -exclusion. Returns {matched, modified, noops, version_conflicts, failures}
Set fields on the documents of a filter (update by query with a Painless script). A key with dots is a path in nested objects, created when absent ({"address.city": "Paris"}). The target cannot hold *, ?, _all or a -exclusion. Returns {matched, modified, noops, version_conflicts, failures}
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
changes_json: The fields to set, as a JSON object - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
changes_json: The fields to set, as a JSON object - String - required
admin
elastic update "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"author\": \"Hugo\"}" "{\"status\": \"classic\"}"
mentdb
{"matched": 2, "modified": 2, "noops": 0, "version_conflicts": 0, "failures": []}
elastic update <config> <index> <filter_json> <changes_json> <options_json>
Description
Update with options: refresh (true: visible at once), conflicts (abort or proceed), max_docs
Update with options: refresh (true: visible at once), conflicts (abort or proceed), max_docs
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
changes_json: The fields to set, as a JSON object - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
changes_json: The fields to set, as a JSON object - String - required
options_json: The options - String - required
admin
elastic update "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"range\": {\"year\": {\"gte\": 1880}}}" "{\"status\": \"naturalist\"}" "{\"refresh\": true}"
mentdb
{"matched": 1, "modified": 1, "noops": 0, "version_conflicts": 0, "failures": []}
elastic search_all <config> <index>
Description
All the documents of an index with the scroll API (sorted by _doc), 100000 rows at most by default; the scroll is cleared at the end
All the documents of an index with the scroll API (sorted by _doc), 100000 rows at most by default; the scroll is cleared at the end
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
admin
elastic search_all "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "logs-test"
mentdb
[{"_id": "vvk_6aEBBV3A2cZE7eF3", "level": "info", "msg": "start"}, {"_id": "v_k_6aEBBV3A2cZE7eF3", "level": "error", "msg": "disk full"}]
elastic search_all <config> <index> <json_query> <options_json>
Description
All the hits of a query (no from, search_after or aggs); options: limit (100000, 1000000 at most), page_size (1000, 10000 at most), keep_alive (1m), meta
All the hits of a query (no from, search_after or aggs); options: limit (100000, 1000000 at most), page_size (1000, 10000 at most), keep_alive (1m), meta
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
json_query: The body of the search in the query DSL: query, size, from, sort, _source, aggs, highlight... ({} or empty: all the documents, 10 hits by default) - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
json_query: The body of the search in the query DSL: query, size, from, sort, _source, aggs, highlight... ({} or empty: all the documents, 10 hits by default) - String - required
options_json: The options - String - required
admin
elastic search_all "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"query\": {\"range\": {\"year\": {\"gte\": 1800}}}, \"_source\": [\"title\"]}" "{\"page_size\": 2}"
mentdb
[{"_id": "3", "title": "Madame Bovary"}, {"_id": "1", "title": "Les Misérables"}, {"_id": "2", "title": "Notre-Dame de Paris"}, {"_id": "4", "title": "Germinal"}]
elastic query <config> <text>
Description
A SQL query (Elasticsearch SQL, or the SQL plugin of OpenSearch): rows with the column names; the cursor is followed then closed, 10000 rows by default
A SQL query (Elasticsearch SQL, or the SQL plugin of OpenSearch): rows with the column names; the cursor is followed then closed, 10000 rows by default
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
text: The SQL query - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
text: The SQL query - String - required
admin
elastic query "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "SELECT author, COUNT(*) AS n, AVG(price) AS price FROM books GROUP BY author ORDER BY author"
mentdb
[{"author": "Flaubert", "n": 1, "price": 7.199999809265137}, {"author": "Hugo", "n": 2, "price": 11.199999809265137}, {"author": "Voltaire", "n": 3, "price": 5}, {"author": "Zola", "n": 1, "price": 8.399999618530273}]
elastic query <config> <text> <options_json>
Description
SQL with options: params (the values of the ? as a JSON array), limit (10000, 1000000 at most), fetch_size (1000), dialect (auto, elasticsearch, opensearch)
SQL with options: params (the values of the ? as a JSON array), limit (10000, 1000000 at most), fetch_size (1000), dialect (auto, elasticsearch, opensearch)
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
text: The SQL query - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
text: The SQL query - String - required
options_json: The options - String - required
admin
elastic query "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "SELECT title, year FROM books WHERE year < ? ORDER BY year" "{\"params\": [1860], \"fetch_size\": 2}"
mentdb
[{"title": "Zadig", "year": 1747}, {"title": "Micromégas", "year": 1752}, {"title": "Candide", "year": 1759}, {"title": "Notre-Dame de Paris", "year": 1831}, {"title": "Madame Bovary", "year": 1857}]
elastic delete_where <config> <index> <filter_json>
Description
Delete the documents of a filter. An empty filter ({} with any spaces) is refused: use {"match_all": {}} to delete everything; the target cannot hold *, ?, _all or a -exclusion. Returns {deleted, total, version_conflicts, took_ms, failures}
Delete the documents of a filter. An empty filter ({} with any spaces) is refused: use {"match_all": {}} to delete everything; the target cannot hold *, ?, _all or a -exclusion. Returns {deleted, total, version_conflicts, took_ms, failures}
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
admin
elastic delete_where "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "{\"author\": \"Voltaire\"}"
mentdb
{"deleted": 3, "total": 3, "version_conflicts": 0, "took_ms": 10, "failures": []}
elastic delete_where <config> <index> <filter_json> <options_json>
Description
Delete by filter with options: refresh (true: visible at once), conflicts (abort or proceed), routing
Delete by filter with options: refresh (true: visible at once), conflicts (abort or proceed), routing
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The target: an index, an alias, a pattern like logs-* or a comma list - String - required
filter_json: The filter: {} for all; an object of equalities {"author": "Hugo", "year": [1831, 1862]} (term/terms, null = field absent); a query clause like {"range": {"year": {"lt": 1860}}} or {"bool": ...}; or {"query": {...}} - String - required
options_json: The options - String - required
admin
elastic delete_where "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "logs-test" "{\"level\": \"info\"}" "{\"refresh\": true, \"conflicts\": \"proceed\"}"
mentdb
{"deleted": 1, "total": 1, "version_conflicts": 0, "took_ms": 15, "failures": []}
elastic delete <config> <index> <id>
Description
Delete a document by id: {deleted: 1}, or {deleted: 0} if it does not exist
Delete a document by id: {deleted: 1}, or {deleted: 0} if it does not exist
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id of the document (512 bytes at most) - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id of the document (512 bytes at most) - String - required
admin
elastic delete "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "4"
mentdb
{"deleted": 1}
no such id (fixed result: real Elasticsearch 9.5.6)
admin
elastic delete "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "404"
mentdb
{"deleted": 0}
elastic delete <config> <index> <id> <options_json>
Description
Delete a document with options: refresh, routing
Delete a document with options: refresh, routing
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id of the document (512 bytes at most) - String - required
options_json: The options - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
index: The index name (lowercase) - String - required
id: The id of the document (512 bytes at most) - String - required
options_json: The options - String - required
admin
elastic delete "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "books" "3" "{\"refresh\": \"wait_for\"}"
mentdb
{"deleted": 1}
elastic request <config> <method> <path>
Description
Any endpoint of the REST API, GET, POST, PUT, PATCH, DELETE or HEAD (HEAD: 1 or 0): the JSON answer, or the text. No .., and no encoded dot or slash (%2E, %2F) in the path
Any endpoint of the REST API, GET, POST, PUT, PATCH, DELETE or HEAD (HEAD: 1 or 0): the JSON answer, or the text. No .., and no encoded dot or slash (%2E, %2F) in the path
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
method: The HTTP method - String - required
path: The path with an optional query string, like /books/_settings - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
method: The HTTP method - String - required
path: The path with an optional query string, like /books/_settings - String - required
admin
elastic request "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "GET" "/_cat/count/books?format=json&h=count"
mentdb
[{"count": "2"}]
elastic request <config> <method> <path> <body_json>
Description
Any endpoint with a JSON body (NDJSON for _bulk and _msearch: one JSON per line)
Any endpoint with a JSON body (NDJSON for _bulk and _msearch: one JSON per line)
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
method: The HTTP method - String - required
path: The path - String - required
body_json: The body - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
method: The HTTP method - String - required
path: The path - String - required
body_json: The body - String - required
admin
elastic request "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "PUT" "/books/_settings" "{\"index\": {\"refresh_interval\": \"5s\"}}"
mentdb
{"acknowledged": true}
elastic collection_drop <config> <name>
Description
Delete an index (an exact name: no wildcard). Returns {dropped, existed}
Delete an index (an exact name: no wildcard). Returns {dropped, existed}
Parameters
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
name: The index name - String - required
config: The configuration as JSON: url (http://localhost:9200; a path is kept, for a proxy), one authentication among username with password (the name of a secret: secret set), api_key (or api_key: the encoded value, or id:api_key) and bearer (the name of a secret: secret set), ca_file (the PEM or DER certificate of the CA, like config/certs/http_ca.crt of Elasticsearch 8+; the host name is checked), insecure (false; true: no certificate check, only for localhost), allow_plain (false: credentials over http are refused unless the host is localhost, 127.0.0.1 or ::1), timeout_ms (30000), max_response_mb (64) - String - required
name: The index name - String - required
admin
elastic collection_drop "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "logs-test"
mentdb
{"dropped": "logs-test", "existed": true}
no such index (fixed result: real Elasticsearch 9.5.6)
admin
elastic collection_drop "{\"url\": \"https://localhost:9200\", \"username\": \"elastic\", \"password\": \"es_password\", \"ca_file\": \"conf/es_http_ca.crt\"}" "logs-old"
mentdb
{"dropped": "logs-old", "existed": false}
