> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tablepro.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Elasticsearch

> Connect to Elasticsearch with a Query DSL console, index browsing, and document editing

Two things share this connection. A grid browses and edits documents by `_id`, and a console that takes a method, a path and an optional JSON body the way Kibana Dev Tools does. There is no SQL behind either. Elasticsearch 7.x and 8.x are supported, over the REST API.

The Elasticsearch driver is not in the app. Picking Elasticsearch in the **Choose a Database** sheet offers the
download before the form opens, and opening a saved Elasticsearch connection installs it without asking.
See [Plugins](https://docs.tablepro.app/features/plugins.md).

## Quick setup

Click **New Connection…**, select **Elasticsearch**, enter a node under **Hosts**, pick an **Auth Method**, then click **Save & Connect**.

The form shows no Database field: a connection reaches one cluster, and its indices are the objects.

For a node on a private server, open the **Network** tab and set **Connect via** to **SSH Tunnel**, then enter the address Elasticsearch listens on as the SSH server sees it under **Hosts**, usually `localhost:9200`. See [SSH Tunneling](https://docs.tablepro.app/connections/ssh-tunneling.md).

## Clusters

Add one row under **Hosts** per node of the cluster, as `host:port` or a pasted URL such as `https://10.0.0.1:9200`. **SSL Mode** decides between HTTP and HTTPS for every node, so a pasted `https://` URL needs a mode other than **Disabled**.

The connection uses the first node that answers and stays on it:

* A node that refuses or drops the connection sends reads to the next node at once.
* A request that changes data moves only when it never reached the node, so it is never applied twice.
* A request that times out is not sent again. The next request goes to the next node.
* Over a tunnel, only the first node is used.

## Connection settings

| Field | Description |
| - | - |
| **Hosts** | One or more nodes of the cluster, `localhost:9200` for a local node. A host without a port uses `9200`, a URL without one uses `443` or `80` |
| **Auth Method** | Username & Password, API Key, or None |
| **API Key** | Base64-encoded key. Shown when **Auth Method** is API Key |
| **Skip TLS Verification** | Options tab. Trusts any certificate, even under **Verify CA** or **Verify Identity** |

## Authentication

| Auth Method | What is sent |
| - | - |
| **Username & Password** | HTTP Basic, from the standard credential fields |
| **API Key** | An `Authorization: ApiKey` header carrying the field verbatim. Paste the `encoded` value the create API key request returns, or your own base64 of `id:api_key` |
| **None** | Nothing. For a cluster with security off |

8.x ships with security and TLS on, so **None** is a 7.x or dev-cluster setting.

## Browsing indices

The sidebar lists indices as tables, hiding names that begin with `.`. Browsing an alias, or any name that resolves to several indices, shows the union of their mappings.

Columns come from the index mapping. `object` fields flatten to dotted paths such as `address.city`. A `nested` field gets one JSON column for the whole array of objects, plus a dotted column per leaf (`identifiers.type`) whose cell is a JSON array with one entry per object, `null` where an object omits the field. Array and object values render as JSON in the cell. Every document also carries `_id`, `_index` and `_score`, and `_id` is the primary key. Type an `_id` into a new row to name the document; any other edit to the three stops the save.

Column filters translate to `term`, `range`, `wildcard`, `terms` and `exists`. Two filter rows on leaves of the same array match two different objects unless you set both rows to the same element. The **Raw SQL** filter column is the exception: its text goes over as a `query_string`, so write Lucene there, `name:Widget` or `price:>10`, matched across all fields. Sorting a `text` field targets its `.keyword` subfield when the mapping has one. A nested leaf sorts and filters; its JSON parent column does neither.

Grid edits become REST calls keyed by `_id`: `POST /index/_update/{id}`, `PUT /index/_doc/{id}` and `DELETE /index/_doc/{id}`. An update or delete goes to the index the document was read from and carries its `routing`, so a child document of a `join` field, or one indexed with custom routing, is changed on its own shard. In a `text` or `keyword` field, a value that reads as a JSON array is saved as an array only when the field already holds one; otherwise it stays a string. A new row saves it as an array unless the rows read held such a string in that field. Edit a nested array through its JSON parent column. A value typed into one of its leaf columns, in an existing document or a new one, cannot be written, so Save stops, names that column, and sends nothing until you undo the edit.

Deleting an index from the sidebar sends `DELETE /<index>`, the request the confirmation shows.

Export reads the whole index with a point-in-time and `search_after`, so it is not capped at the 10,000-document result window. If a shard cannot answer partway through, the export stops with the server's error instead of writing a file without that shard's documents.

## Query DSL console

![Elasticsearch Query DSL console with a search result rendered as a grid](https://mintcdn.com/ngquct/tXWaltqW4Zqkau0T/images/elasticsearch-query-console.png?fit=max\&auto=format\&n=tXWaltqW4Zqkau0T\&q=85\&s=26376c9b8c9232718f9f57be3c383f33)

Query DSL console with a search result grid

```http theme={null}
GET /my-index/_search
{
  "query": {
    "match": { "title": "search term" }
  }
}
```

Search responses render as a grid, `GET /_cat/indices?format=json` and other array responses tabularize, and anything else is shown as formatted JSON.

## SSL/TLS

New connections start on **Disabled**, plain HTTP with no fallback to anything else. Every other mode goes over HTTPS: **Preferred** and **Required (skip verify)** accept a self-signed certificate, **Verify CA** and **Verify Identity** check it. See [SSL/TLS](https://docs.tablepro.app/connections/ssl.md).

## Limitations

* The SQL endpoint (`_sql`) is not reachable. Use the console.
* The sidebar lists concrete indices only, and hides every name beginning with `.`. Aliases and data streams do not appear; address them by name in the console.
* Sorting on `_id`, or on a `text` field with no `.keyword` subfield, does nothing: the column is dropped from the sort and the rows keep the order they had. Add the subfield, or sort a keyword field.
* Paging past 10,000 documents switches to `search_after` over a point-in-time. That threshold is fixed, so an index with a lowered `max_result_window` errors before the switch; raise the index setting back to 10,000.
* An array or object cell is cut at 10,000 characters and ends in `...`. Saving an edit to a cut cell is refused; change long values in the console.
* Truncate is not offered. The nearest thing Elasticsearch has is `_delete_by_query`, which runs asynchronously and reports conflicts per document. Run it in the console.
* No mapping or schema editing, no transactions, no import.
* OpenSearch is not supported.

## Troubleshooting

### Authentication failed: …

The username and password, or the API key, were rejected. On 8.x check the connection is on HTTPS at all: security is on by default there.

### Connection failed: …

A TLS or network failure. For a self-signed certificate set **SSL Mode** to **Required (skip verify)**, or turn on **Skip TLS Verification**.

## Related

* [Import & Export](https://docs.tablepro.app/features/import-export.md)
* [Filtering](https://docs.tablepro.app/features/filtering.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.