4.1.2. Creating queries

With the query builder you can create complicated searches on multiple lexica. The Query builder is still a bit buggy, but we try to explain exactly what to do, so if you follow this manual word by word, it should work. In the mean time we work on the bugs.

To create a query first go to Queries and searching in the left frame of the Workspace. In the left frame you will find a list of available queries in the workspace. The list is initially empty. Click + icon to create a new query. In the pop-up window, add a name for the query and if you want also add a description. E.g. if you want to create a querie to select all lexical items which are defined as 'tree' in one or more of the lexica in your workspace, call the query 'Trees'. Click OK. Your new query now appears in the list. (Note that when your list is not empty, and you create a new query by selecting the + icon, a different window pops-up. In this window: check the circle in front of Filter. The Name that will appear is the name of one of your previously created Queries, but simply overwrite this name (this is one of the buggy behaviors), and a new query will be created leaving the old one in tact.)

Now, your query is created, but not yet defined. Close all the pop-ups that have appeared (buggy again!). Select the new query in the list and click the + icon. Now select a lexicon in the drop downlist, for the first query constraint. Next select the data category in which the query needs to be performed, the value and the condition (not/is/contains etc.). You have now defined the first contraint of the query. If you want to define another constraint, you must first decide whether the second condition will be in an OR relation to the first (for example data category definition should contain 'fish' or 'net') or if you want the second constraint to be in an AND relation to the first ('fish' AND 'net').

In case you want an OR relation: Select the lexicon node of the query, and click the + icon. Select the data category for the second constraint, the value and the condition. Your query should not look like the Fish query in Figure 4.2. The Fish query in the image searched for entries in the lexicon Fish Gloss, that contain the value 'fish' in the data category 'Definition (E)' OR in the data category 'Definition (E) (se)'.

In case you want an AND relation: Select the data category node of the query and click the + icon. Select the data category for the second constraint, the value and the condition. The new condition will now be sub-ordinate to the first.

You can also search in multiple lexica, using an OR relation between them. To add a second query constraint from a second lexicon. Select the Query node in the tree and click the + icon. Select the lexicon for the second constraint from the drop down list and further follow the procedure as decsibed above. The 'Tree query' shown in Figure 4.2 will search for: lexical entries in the lexicon 'Yeli Dnye demo lexicon' that contain the string 'tree' in the data category "description' OR lexical entries in the lexicon 'Coconut glossary' that contain the string 'tree' in the data category 'Definition(E)'.

Always save your created query from the File--> Save menu.

Query builder

Figure 4.2. Query builder