The data browser is designed to make queries, index creation, index maintenance, and other Elasticsearch APIs available through the Compose Console.
The first page of the data browser shows the status of the cluster, similar to the results from executing a Cluster-health call. It displays the deployment's status, uptime, total disk size, the total number of nodes and shards, and the total number of documents from all indices.
Below that is a list of all indices, showing the number of documents, the number of deleted documents, and the disk size of each index.
Main browser window with the shakespeare index.
To get back to the main page of the deployment, click on the deployment name at the top from any screen.
In the upper right of the main page of the data browser is a Create Index button. To create a new index:
- Click Create Index and enter a name for the index in the
curlscript showing at the top of the page.
- Set the index fields to the desired values. By default, they are set to 5 shards and 1 replica.
- Run the script.
Once the index is created, the view changes to a listing of the types in this index. Clicking the 'REST Editor' link in blue pulls up a generated URI endpoint and a JSON mapping template for creating a new type.
Types listing for an index.
Upon creating a new index or selecting an existing index the sidebar on the right contains the tools to edit types and run queries, a REST editor, and an administration panel.
Click on an index name to access the list of types in the index, and then click on the type name to run a query on documents of that type. Query results are displayed below the query-string and the document details are revealed by clicking on them.
The Documents tab displays the fields and contents of the documents while the Mapping tab displays the field mapping for this type. It is also possible to insert documents for each type using Insert Document in the upper right.
The REST editor allows access to the Elasticsearch API by selecting one of the GET, PUT, POST, or DELETE commands from the drop-down menu and building a URI endpoint in the neighboring text field. GET, PUT, and POST also have a text box for a JSON body. Once the request is made, the result is displayed below.
The browser's REST editor.
One thing to note, the REST editor does support the
\_bulk inserting of data but it is not recommended as it could cause browser slowdown and instability. For
\_bulk inserts using a
curl script is the preferred method.
In the Admin section, there are multiple tools for index performance and optimization from the Elasticsearch Indices API. The effects are limited to the current working index.
The admin panel in the browser.
If this article didn't solve things, summon a human and get some help.