View on GitHub

Keywords and Advanced Query

Keywords

Keywords aim to provide an easier way for querying elasticsearch : instead of using the elasticsearch syntax, one can define a keyword that relies to an elasticsearch query. This keywords is then available for any curiosity user on the cluseter. They may ben chained in a logical expressionto build a complex but human understandable query.

Each keyword has a specific scope : it may be associated to an index or to all indexes (global scope). There is two way to add a new keyword.

Keyword's Pop-up

Screenshot of Curiosity's keywords pop up

Open the pop-up by clicking on the yellow "A" in the navbar present at the bottom of your screen.

To add a new Keyword, select first the scope : it may be a specific index, but may be set as "global" for more general purpose (global is a specific entry of the index dropdown list).

A list of all the existing keywords attached to the selected index is then displayed. Hitting the "add" button opens a 3 input field form.

When you have created all of your keywords, or made some modifications, hit the button save to send your data to your conf server and make it persistent.

Keyword creation from a query

You can create a new keyword directly from your query, when you use the advanced query module, by pressing "keyword from query" button. Two fields will appear under the button. Refer then to the previous procedure (keyword creation from "keyword tab") : fill inputs, press the "save" button to make your keyword available.

Screenshot of Curiosity's keywords from query functionality

Advanced Query Module

Advanced query modules allows you to built more complex request than the default query module.

Keywords and fields panels

There is two panel at the top of the module. The first one is your keywords list, you can filter them by filling the input at the top of the panel, or display the full list by clicking on "Show all" button. If you click on a keyword, it will be add into your query.

The second panel works in a similar way but deals whith index's fields : selecting a field will add its document full path to the query input. This may be used to query the index by a field in an easy way (no need to know the document structure to search one that match a specific value for a given field).

Sort

You can add sort (as many as you want) by clicking on "Add sort" button. It will add a text input with 4 buttons on its rigth. Fill the input with the path to the field you want to sort on. The first button is the sort's order (Asc/Desc), the second remove the sort and the two last buttons allows you to reorder your sort.

JSon Query

By clicking on "Json Query" at the bottom of the module it will show you the json of the last query which has been sent