Introductionedit

Sense is a handy console for interacting with the REST API of Elasticsearch. As you can see below, Sense is composed of two main panes. The left pane, named the editor, is where you type the requests you will submit to Elasticsearch. The responses from Elasticsearch are shown on the right hand panel. The address of your Elasticsearch server should be entered in the text box on the top of screen (and defaults to localhost:9200).

Screenshot
Figure 1. The Sense UI

Sense understands commands in a cURL-like syntax. For example the following Sense command

GET /_search
{
  "query": {
    "match_all": {}
  }
}

is a simple GET request to Elasticsearch’s _search API. Here is the equivalent command in cURL.

curl -XGET "http://localhost:9200/_search" -d'
{
  "query": {
    "match_all": {}
  }
}'

In fact, you can paste the above command into Sense and it will automatically be converted into the Sense syntax.

When typing a command, Sense will make context sensitive suggestions. These suggestions can help you explore parameters for each API, or to just speed up typing. Sense will suggest APIs, indexes and field names.

Suggestions
Figure 2. API suggestions

Once you have typed a command in to the left pane, you can submit it to Elasticsearch by clicking the little green triangle that appears next to the url line of the request. Notice that as you move the cursor around, the little triangle and wrench icons follow you around. We call this the Action Menu. You can also select multiple requests and submit them all at once.

The Action Menu
Figure 3. The Action Menu

When the response comes back, you should see it in the right hand panel:

Screenshot
Figure 4. The Output Pane

Sense allows you to easily switch between Elasticsearch instances. By default it will connect to localhost:9200 but you can easily change this by entering a different url in the Server input:

Server
Figure 5. The Server Input

This pretty much covers the basics. To follow up, read the installation instructions or dive deeper into the UI.

Sense is a development tool and is configured by default to run on a laptop. If you install it on a server please look at the Securing Sense for instructions on how make it secure.