HfogDocsv1.0.0

OpenSearch in DB Studio

See your account's OpenSearch indices in DB Studio, browse and search their documents, read mappings and settings, import and export JSON Lines, and send requests from the console.

DB Studio opens the OpenSearch node of your hosting account with the account's own login for it. The tabs have the same names as for databases: an index takes the place of a table, a document the place of a row.

Where: DB Studio › opensearch in the tree

It is listed once OpenSearch is switched on for your account in the Control Panel.

Indices

The Structure tab lists the indices with their Health, Documents and Size. Create new index takes an Index name: it starts with a lowercase letter or digit and holds lowercase letters, digits, _, ., + and -. The node's own indices (names that start with a dot) are not shown and can't be changed here.

An index's tabs

Tab What it does
Browse the documents, page by page; Search documents narrows them
Structure the Fields with their type, and the index's Mappings and Settings as JSON
Console sends a request to the node
Insert Add document
Export / Import JSON Lines files
Operations refresh, flush, merge, clear caches, open and close, empty and delete

Documents

  • Search documents: type words to find, or a query as JSON ({"match": {"title": "tea"}}).
  • Edit opens a document as JSON; Save writes it back. Delete removes it after you confirm.
  • Add document: type the Document (JSON). The id is made by the node when you leave it empty.

Export and import

  • Export index (.jsonl) downloads every document, one per line, with its _id.
  • Import takes JSON Lines (.jsonl or .ndjson, .gz allowed), one document per line. It stops at the first document that can't be added.

Operations

Operation What it does
Refresh makes the latest changes searchable now
Flush writes what is in memory to disk
Merge segments rewrites the index as one segment: smaller and faster to read, slow to do
Clear caches empties the index's query and field caches
Close index / Open index a closed index keeps its data but can't be searched or written
Delete every document keeps the index, its mappings and settings
Delete index the index and all its documents

The console

Type a Request such as GET /my-index/_search, and a Body (JSON) when the request takes one, then click Run. Each request may take 30 seconds.

The console sends these requests:

Kind Requests
Read GET /, GET /_cat/indices (also aliases, count, health, shards, segments, templates), GET /_cluster/health, GET /_cluster/stats, and for an index _search, _count, _mapping, _settings, _stats, _alias, _doc/<id>, _source/<id>, _explain/<id>, _field_caps, _validate/query, _msearch, _mget, _analyze
Query languages POST /_plugins/_sql, POST /_plugins/_ppl
Change PUT /<index>, DELETE /<index>, PUT /<index>/_mapping, PUT /<index>/_settings, documents (_doc, _create, _update, _bulk, _delete_by_query, _update_by_query), _refresh, _flush, _forcemerge, _cache/clear, _open, _close, POST /_aliases

Requests to the node's own settings, its security set-up, snapshots, scripts and tasks are not sent from here. A request that changes an index must name it in full (no *). Changes are written to the activity log.