In this section you will find a more detailed description of UI of Sense. The basic aspects of the UI are explained in the Introduction section.
The Sense editor allows writing multiple requests below each other. As shown in the Introduction section, you can submit a request to Elasticsearch by positioning the cursor and using the Action Menu. Similarly you can select multiple requests in one go:
Sense will send the request one by one to Elasticsearch and show the output on the right pane as Elasticsearch responds. This is very handy when debugging an issue or trying query combinations in multiple scenarios.
Selecting multiple requests also allows you to auto format and copy them as cURL in one go.
Sense allows you to auto format messy requests. To do so, position the cursor on the request you would like to format and select Auto Indent from the action menu:
Sense will adjust the JSON body of the request and it will now look like this:
If you select Auto Indent on a request that is already perfectly formatted, Sense will collapse the request body to a single line per document. This is very handy when working with Elasticsearch’s bulk APIs:
Sense comes with a set of nifty keyboard shortcuts making working with it even more efficient. Here is an overview:
- Ctrl/Cmd + I
- Auto indent current request.
- Ctrl + Space
- Open Auto complete (even if not typing).
- Ctrl/Cmd + Enter
- Submit request.
- Ctrl/Cmd + Up/Down
- Jump to the previous/next request start or end.
- Ctrl/Cmd + Alt + L
- Collapse/expand current scope.
- Ctrl/Cmd + Option + 0
- Collapse all scopes but the current one. Expand by adding a shift.
Sense maintains a list of the last 500 requests that were successfully executed by Elasticsearch. The history is available by clicking the clock icon on the top right side of the window. The icons opens the history panel where you can see the old requests. You can also select a request here and it will be added to the editor at the current cursor position.