Console

Console enables you to interact with the REST API of Elasticsearch. Console has two main areas:

  • Editor, where you compose requests to send to Elasticsearch.
  • Response pane, which displays the responses to the request. See Response View.

Image

Open Console

There are three ways to open console:

  1. Double-click item in Elasticsearch tool window. The console will be opened with the request and cluster connection associated with this item. In this case, the console doesn’t save the state. After IDE restart it will be closed and requests in the editor will be lost.

  2. Select the cluster and click the Jump to Query Console button or press ⇧ ⌘ F10. In the popup select what console to open.

    Jump to Query Console

    In this case the opened console is persistent, the requests in the editor will be saved after IDE restart or closing console.

    The list of all saved consoles can be viewed in Project -> Scratches and Consoles -> Elasticsearch Consoles

    List of Elasticsearch Consoles

    Each console of this type is associated with one cluster connection that cannot be changed.

  3. From the main menu, select File | New | Scratch File or press ⇧ ⌘ N. Select Elasticsearch file type.

    Open Elasticsearch scratch file

    In this case the opened console is also persistent. Scratch files are automatically numbered and saved to the Project -> Scratches and Consoles.

    List of Elasticsearch scratch files

    Scratch file console has no associated cluster connection. It must be selected on the console toolbar.

Connection

To be able to execute request console must be connected to Elasticsearch. You can see connection associated to this console and its status on the toolbar.

Elasticsearch console connection

For scratch Elasticsearch files you must select the connection from the popup list.

Select console connection

Press Refresh button to reconnect to Elasticsearch.

Execute requests

Console editor can have many requests. To select the request that you want to execute put the cursor at the request path or body. The color frame shows the selected request. If there is only one request you don’t need to select it. To execute request click or press ⌃ ⏎.

Execute multiple requests

Controls on the toolbar

IconShortcutDescription
⌃ ⏎Execute the selected request.
⌘ PSwitch between showing Only Editor / Only Response View.
⌥ ⌘ PSwitch between vertical / horizontal orientation of editor and response view.
F3Open Add to Favorites dialog. See Favorite requests.
⌥ ⌘ EOpen Requests History dialog. See Requests history.
Connection associated with this console.
Reload connection.