Faithlife Corporation

Business Hours

Monday – Saturday
6 AM – 6 PM PDT
Local: 10:28 PM

Graphical Query Editor Tutorial

Prolegomena - Collections, Keyboards and Fonts
Lesson 1 - The Basics
Lesson 2 - Greek Syntactical Searches
Lesson 3 - Advanced Concepts

The purpose of this tutorial is to teach the art of query design on the Graphical Query Editor.

The examples which follow will use the Nestle Aland 27th edition of the Greek New Testament with the GRAMCORD™ Alpha morphology. The basic design principles are the same regardless of which text you are searching, but using the NA27 allows me to show off many features of the search engine, and give a taste of how to combine some of the simple search criteria into more complex queries. Most of these searches will run on an older version of the Gramcord morphologically tagged NA 26 or 27 or the LXX, but the more advanced searches that take advantage of new features will return false hits. You may find it beneficial to make sure you have the latest version of the NA27 by running Libronix Update. If you don't already own a license to the NA 27, you may purchase one here.

NOTE: the query editor can be used with any book in your Libronix Digital Library System for simple as well as complex searching; I just chose to use real world Greek Bible examples to demonstrate the flexibility and power of the new search tools.

Before we begin - a look at collections, keyboards and fonts.


I find it helpful to create collections to represent the different groups of resources I might want to search using the Graphical Query Editor. It's convenient if I want to search all the texts that share a morphology scheme (like searching the LXX at the same time as the NA27), and it is very handy if I go to run a search without remembering to open the resources I wanted to search first - collections always appear as options in the advanced search dialogue. To create a collection for searching the NA27, perform the following steps:

  1. Click Tools | Define Collections.
  2. Click New.
  3. Type NA27 in the name field.
  4. In the find textbox, type in NA27 and select the Nestle-Aland Greek New Testament, 27th edition with GRAMCORD (tm) Greek New Testament Alpha Morphological Database. Then click Add.
  5. Click OK.

This is an example of a one-book collection. Now every time you go to execute a search, you'll have access to this collection, even if you haven't opened this particular bible. You might make another one called 'Gramcord' and include all your Greek Bibles that use the Gramcord morphology and collections for your morph tagged Hebrew resources as well. The rule of thumb is to create collections for the books that you plan on searching on a regular basis from the query editor--it'll save hassle later.

When you are done making all your collections:

  1. Click Close.


Libronix DLS 3.0 has three different keyboard options for Greek: Windows, LLS and Logos. The 'Logos' keyboards are new to LDLS version 3.0, and represent an intuitive way to enter Greek and Hebrew from a Roman/English keyboard. For purposes of this tutorial, let's make sure we're all using the same one. In the rest of the tutorial, when you are required to type Greek, I am going to provide the actual Latin/English characters you need to type in this keyboard map to get the word in question. Remember when working with your own queries that you can also copy and paste directly from your Bible, lexicon, or other Libronix resource into the query editor.

  1. Click the Tools drop-down and select Options | General.
  2. Click the Interface tab.
  3. In the Keyboard Layout dropdown box, select Logos.
  4. Click OK.


Finally, you are now able to select which font you wish to use for working with Greek and Hebrew. Mostly this is personal preference, but you will notice that some fonts are missing some characters, so if you get white boxes in your Greek text, you might try an alternate font. While fontmaps from some older fonts like Graeca II will allow you to use some non-Unicode fonts, Unicode fonts will, in general, look and work better. For an article on Unicode and Fonts in Libronix, along with links to some of the popular Greek fonts available on the Web, click here. To select your font, perform the following steps:

  1. Click Tools | Options | Bible Tools.
  2. Select the Ancient Languages tab.
  3. By selecting various fonts from the drop down boxes, you can view the sample text in that font. Choose the font(s) you like best. Try to stick to the fonts that display in the drop down list, rather than selecting Other which will can you down the path of non-Unicode fonts. Note that some Greek fonts are missing the most-correct Unicode character for the apostrophe, so if you see white boxes where you expect apostrophes, switch to a different font. I often use Gentium or Gentium Alt for my Greek font, which contains the correct apostrophe.
  4. Click OK

Lesson 1 - The Basics

Let's start our first query. In the rest of the tutorial, I'll list the goal of the query at the beginning, but in this query we're going to play with a number of different options, so just hang on for the ride!

  1. Click the File drop-down menu and select New.
  2. If it isn't selected already, select Graphical Queries. You may choose to give your query a name now, or you can accept the default name for now and name the query later when you close it. I prefer to name the query when I close it because I'm given the opportunity to delete the query at that time. This saves having to manually delete a query that isn't worth keeping later, but either method works. I've named this first query 'Lesson 1', as you'll be able to see on the screenshots. When you are done naming your query document, or if you choose not to name it now, click OK.

This opens up a new window in LDLS labeled Graphical Query: with the name (the one you specified or the default) at the top. In the grey bar on the left are a number of objects that you can click and drag onto the white space that is our query document.

  1. Click and drag a TERM object onto the query document. This brings up the TERM editor window. Check the Language box and choose Greek from the drop-down list. You'll notice that this opens up two large white boxes inside the term editor. The left box will auto generate a list of Greek words to choose from as you start typing, while the right window will display a KeyLink definition for that word (if one is available). These are simply aids to assist you in selecting the words you want--you may search for Greek words that are not on this list (though all the words occurring in the NA27 should be). Hebrew has a similar interface; for other languages, you won't have these additional information boxes.
  2. Press the F2 key twice to toggle your keyboard to Greek. Pressing it once changes from English to Hebrew, pressing the second time toggles to Greek. You will press it a third time when you want to toggle back to English.
  3. Type in the letters (following the English keyboard) kuriov. You'll see the Greek word κυριος (eng. lord, master) appear. Note that before you finished typing, you could have clicked on the word in the list on the left.  

Term WindowIf you have a Greek Lexicon in your library, clicking on the accented form, κύριος, will reveal a lexicon article in the right information box. However, unless you check the Match Marks box towards the bottom of the Term Window, the search won't be concerned about Greek accent marks no matter which form you select or type.

  1. Click OK.

You've just finished your first query. This document as it stands will find all occurrences of the Greek word κυριος. To execute this query:

  1. Click the Search button in the Graphical Query window. This takes you to the Advanced Search dialog. Your active query is already selected for searching, but there are a few options to examine.
  2. In the In: section, click on the radio button that says Resource Collection. From the drop down menu, you can now choose the NA27 collection we created earlier. Now the query knows what resources you want searched.
  3. In the By: section, let's just make sure Bible Verse (the default) is selected. Later we'll want to do some searching using other criteria, such as sentence, listed in a drop down box once Special is selected, but for this simple query, the results will be the same no matter which discourse level is selected.
  4. Advanced Search DialogIf under Range: you select Bible Text you will avoid searching footnotes or introductory material. You can also limit the verse range you want to search. However, a note on ranges: when searching a book that only contains the New Testament, like the NA27, if you want to search the entire NT, leave the range at Bible--it will actually slow the search down slightly if you make the search check that hits are within the NT range.
  5. Now click Search. You'll get a list of all the verses which contain the word κυριος. Clicking on the verse number will jump to your preferred bible, but clicking on the box in the column underneath the NA27 label will jump to the specific bible we searched, in this case the NA27.
  6. Go ahead and close that search results window, but don't close the query document--we're going to try a few new things with our query.
  7. Click and drag another TERM object onto your query document. Dropping the new TERM object on the document opens up the TERM editor window.

Design Principle: It never matters where you place a TERM object in the document. The actual placement of the items on the screen is stylistic, and does not affect the query results. If you decide you didn't like where you dropped an object, just click and drag it somewhere else. Since the query editor is designed to help you visualize exactly what you are searching for, it is good practice to place TERMs close to the other TERMs, REFs, or operators that you are going to connect them to, but placing a term to the left or right of another has no effect.

  1. Click the Language check box again--Libronix remembers that you used Greek last.
  2. Type in Ihsouv, Ιησους - the Greek spelling of the name Jesus. Click OK.

Design Principle: This brings us to one of the important principles of Query design. When you have two terms, or two groups of terms in a more complex query, that are not joined by any arrows to each other, the default relationship between the terms is an OR. So simply by adding this new term, our Query has been transformed into an OR statement, which will now return any verse that contains EITHER κυριος OR Ιησους. In more advanced queries, you may need to use the explicit 'OR' operator in the menu to the left of your query, but this query is 'OR'ed now simply because the terms are not connected.

If you wish, execute this new query by following steps 7-11 above.

Let's start experimenting with other types of relationships between these terms.

  1. Click and drag the AND operator onto the query document.
  2. Hover your mouse on the edges of the word κυριος and move it around until you see a grey arrow. Click and hold the left mouse button to activate the arrow, and drag it over to the AND operator, and release the mouse button to complete the line.
  3. Hover your mouse on the edges of the AND operator in the same manner and drag the new arrow to the word Ιησους. Notice that the direction of the new arrow reversed. This bring us to another...

Design Principle: When drawing arrows between terms and operators, or between two operators, the direction of the arrow must always point TO the governing operator. In the example above, Libronix auto-corrected the direction of the arrow for you - it didn't allow an invalid query. But in more complex queries, it is possible to link up operators with arrows going the wrong direction, which will return results opposite of what you are searching for. This will be illustrated in the steps that follow.

Again, if you wish to execute your new query, with the explicit AND operator instead of the previous implicit OR, you may do so by following steps 7-11 above.

  1. Click and drag a new TERM object onto the Query Document.
  2. Click the Language box again. Enter the word Cristov (Χριστος, eng. Christ) and press OK.
  3. Click and drag the NOT operator into the Query Document.
  4. Draw an arrow between Χριστος and NOT. Again, since you are drawing between a TERM and an OPERATOR, the arrow direction will auto-correct if you draw it wrong--the arrow must point to the governing operator.
  5. Now draw a line from the NOT operator to the AND operator.

This new query will find every verse that contains both Ιησους and κυριος, but does NOT contain Χριστος. When you are drawing arrows between operators, it is possible to draw the arrow in the wrong direction. Had you drawn the arrow from the AND to the NOT, you would be searching for every verse that did NOT contain Χριστος and also did NOT contain the combination of BOTH κυριος and Ιησους (but would return verses that had just the one or the other).

Again, to execute the query as it now stands, follow steps 7-11. Feel free to try searching with the arrow reversed as well if it helps you to see what I described in the above paragraph. But since that search returns most of the New Testament, it is pretty slow!

  1. If you played around with switching the direction of the arrows, make sure that the NOT is pointing to the AND again.
  2. Click on the arrow that connects κυριος and the AND operator. With that line selected, press the Delete key. Deleting elements of your query is as simple as that, just highlight and delete.
  3. Delete the line connecting Ιησους and the AND operator.
  4. Drag and drop the OR operator into the query editor.
  5. Draw a line from κυριος to OR.
  6. Draw a line from Ιησους to OR.
  7. Draw a line from OR to AND.

This demonstrates the use of the explicit OR operator. Remember that unconnected terms or groups of terms are implicitly ORed, but in this instance, we are searching for κυριος OR Ιησους in verses that do NOT contain Χριστος. What would happen if you drew the arrow from the AND to the OR instead? Your search would return every verse that either a) contained Ιησους or b) contained κυριος or c) did not contain Χριστος. Verses that DID contain Χριστος but also had Ιησους or κυριος would be returned, because the NOT Χριστος was just part of a larger OR statement, and thus an optional criteria rather than a required one.

You know the drill by now... Feel free to execute the new query.

Now we are going to play with some new ways of defining relationships between search terms.

  1. Highlight the AND operator. Press Delete. Notice that deleting the operator also deletes the arrows connecting to it.
  2. Delete the OR operator.
  3. Delete the NOT operator.
  4. Now draw an arrow from Ιησους to κυριος.

Notice the direction of the arrow. This arrow is specifying the order in which the connected terms must appear. In the screenshot, my arrow is pointing from right to left, but the TERM the right must come before the TERM the left in our search - the direction of the arrow, not the arbitrary order of the TERMs in the query document, is what determines the word order being searched.  What you've just told the Query engine is that you want to find all verses where Ιησους occurs BEFORE κυριος. Furthermore, you want the Engine to also return all verses that contain Χριστος. Can you remember why? Because Χριστος is not connected to the other search terms by any arrows or operators, a relationship of OR is implicit.

Design Principle: Drawing an arrow between search terms is an implicit AND operator, so you do not need to connect Ιησους and κυριος with an explicit AND. Indeed doing so unnecessarily complicates your query. Remember the implicit AND of the arrow between terms and the implicit OR of isolated terms, and avoid putting redundant (or contradicting!) operators into your queries.

By default, the arrow between search terms doesn't specify the distance between the search terms, only the order.

  1. Double-click on the arrow between Ιησους and κυριος.

This brings up the Proximity editor window. This allows you to specify ranges between search terms, such as At most 20 characters intervening or At least 3 words intervening. Note that the Words unit is an estimate, not a precise word count--it is designed to help people think in terms of rough word ranges instead of characters. Adjacent is used to specify that the second term must immediately follow the first. We will explore uses of the Same option in the next lesson, so don't worry about it for now.

  1. Click the box entitled Ignore order of terms.
  2. Click OK.

Notice that the arrow now points both directions. Since we didn't specify a range, and we now don't care about the order of the search terms, this double-headed arrow will behave exactly like the AND operator.

  1. Now draw a new arrow from Ιησους to Χριστος.

If you were to run this query, it would return all verses where Ιησους occurs before Χριστος AND the word κυριος appeared anywhere in the verse. κυριος might appear either after or before the Χριστος, as there is no line between κυριος and Χριστος to define proximity relationships between those terms, and the double ended arrow between κυριος and Ιησους tells the engine not to worry about the order of those terms. Can you guess how you would specify that both Ιησους and κυριος must appear before Χριστος in your hits? Simply draw an arrow from κυριος to Χριστος. (Feel free to experiment with this, or any other tip in the non-numbered instructions, but make sure to use the Undo button to undo any changes you make that aren't part of the numbered instructions, so that we stay together. The Undo arrow is the little curved hook that points to the left on the main toolbar.)

  1. Repeat steps 35-37 on the new arrow. When you are done, this new arrow should also point in both directions.

Running this query would return every verse where all three terms, Χριστος, κυριος, and Ιησους appear.

  1. Double-click on the search term Χριστος.

This pulls up the Term editor window again, allowing us to edit the entry. Down at the bottom, there are a number of options. Note that match case simply tells the query to only return hits that match the capitalization of your search terms; it has nothing to do with grammatical case (nominative, genitive, etc.). By default, the Query engine isn't too concerned about accent marks or breathing marks in Greek (since accents in verbs especially can shift depending on surrounding context, this flexibility isn't necessarily a bad thing), but if you ever need the engine to be very specific about the special marks it needs to match, check the Match Marks button.

  1. Check the box Exclude Term.
  2. Click OK.

Notice that Χριστος now has a red circle around it. This is NOT the same as the NOT operator. This term will match anything that is NOT the word Χριστος. Our present query will still return verses which contain the word Χριστος as long as it can match at least one word in the sentence that is NOT Χριστος. While that renders the use of the 'Exclude' in this search fairly useless, the feature does have some interesting applications when combined with other operators. We will explore one example below.

  1. Delete the arrow between Ιησους and Χριστος.
  2. Delete the arrow between κυριος and Ιησους.
  3. Draw a new arrow from κυριος to Ιησους.
  4. Draw a new arrow from κυριος to Χριστος.
  5. Draw a new arrow from Χριστος to Ιησους.
  6. Double-click on the search term Χριστος.
  7. Click Intervening Term.

Intervening TERMs allow you to specify what may, or may not, occur between two regular TERMs (or REFs, which you will encounter in Lesson 2), as in our example where the intervening TERM is connected by two arrows.  If connected with only one arrow to a single TERM, an intervening TERM will specify criteria between the regular TERM and the beginning or end of the document level (verse, sentence, etc. - whichever is specified in the Advanced Search Dialog) depending on the direction of the arrow.

If a search criteria is Required than it must exist between the search terms. If it is Optional then it may or may not exist between the search terms (by itself, an Optional Term/Ref doesn't accomplish much, but this can be combined with Agreement and Proximity operators in fairly powerful ways). If a term is Filtered, then every word between the first and the second search term must meet the criteria of the intervening term. In English, we tend to only think of filters as excluding, but in Query language, a filter can be positive or negative. If you have Exclude and Filter checked, then the word Χριστος cannot occur between the terms κυριος and Ιησους--pretty much what you expect the English word 'filter' to mean. However, if you uncheck the Exclude box, then every word that appears between κυριος and Ιησους must match Χριστος. You will still get a hit if there is no Χριστος in the verse at all, as long as NOTHING is in between the search terms (remember, you would use the Required option if the term needed to be present, not a Filter). But if a word exists between the terms, it must match Χριστος, because our positive (non-excluded) Filter demands it.

In a later lesson, we'll start combining filters with lists of TERMs or REFerences, and it will become apparent how powerful these different features are. For now:

  1. Click Filter.
  2. Click OK.

Running this query will find all verses where κυριος occurs before Ιησους, without the word Χριστος in-between.

Design Principle: The direction of arrows when dealing with intervening terms/filters is very important. It is nearly always a bad idea to use double ended arrows when dealing with intervening terms (notice how I had you create new one-directional arrows before running the above query). The direction of the arrows to and from the filter should match the direction of the arrows between the two search terms you are adding the filter criteria to. So how would you run a filter in cases where you wanted to be flexible about word order? Take advantage of the implicit OR by creating an un-connected group of search criteria with the arrow reversed. Follow the steps below...

  1. Click and drag on the white space of your query till you have drawn a box around your entire query and then release the mouse button. Your whole query should now be highlighted.
  2. Press Ctrl+C on your keyboard. This copies the query to the Windows Clipboard.
  3. Press Ctrl+V to paste the duplicate of your query back into the same query document.
  4. You may click and drag this entire replica to a spot on the query page that doesn't overlap the other query if you need to.

Currently, the Graphical Query Editor does not support a 'Save As...' function. I use the same copy-paste technique to paste whole queries into new documents when I want to save an older query before making major changes.

  1. On this second copy, delete all three arrows.
  2. Redraw new arrows connecting the terms in the opposite direction.

Running this query will now return all instances where κυριος and Ιησους occur without Χριστος in between them, regardless of the order of the two search terms.

Design Principle: When specifying proximity, it is best to only modify the proximity operators between the basic search terms, not between the regular terms and the intervening terms. Remember that 'optional' and 'filter' terms don't have to exist in the verse for the verse to generate a hit, so giving proximity ranges on optional criteria is likely to skew your results in undesirable ways. To reiterate, don't modify proximity on arrows connecting to or from 'intervening terms'. Indeed, this is the only reason I had you draw the line from κυριος to Ιησους in step 45. If you didn't intend to add any proximity operators, that line would be redundant with the lines going to and from the filter, which are sufficient to establish the order of terms.

To limit our query to verses where the search terms appear close to each other, perform the following steps:

  1. Double click the line from κυριος to Ιησους. Modify the proximity to At most 4 intervening and select Words as the unit.
  2. Repeat for the line from Ιησους to κυριος on the other half of the query.

Running the query now will only return hits where Ιησους occurs within (approximately) 4 words of κυριος, regardless of the order of those terms, when Χριστος does not occur between them.

This is the end of lesson one. Congratulations, you've learned the basics of query design--how to get a query started, enter Greek search terms, use Boolean AND, NOT, and OR operators, specify order of search terms and proximity, and even use intervening terms and filters.

Lesson 2 - Greek Syntactical Searches

In this intermediate lesson, we'll build on what we've learned in the previous lesson and construct a query that includes Greek Morphological References, Reference lists and the new Agreement Operator.

For this lesson, we're going to search for instances of the Greek syntactical structure Genitive Absolute. Don't worry if you don't know what that is (If you have a decent collection of Libronix titles, chances are good that if you did a search in your library for this phenomenon you could read all about it)--it was just chosen to show off the power of the Graphical Query Editor using a real-world syntactical example. What concerns us here is not the semantic definition of the Genitive Absolute, but rather its syntactical structure, because it is this structure that we are going to search for.

Genitive Absolutes occur with a participle in the genitive case paired with another substantive (could be another participle, or a noun, pronoun, or adjective) also in the genitive case, matching the original participle in number (i.e., either both singular or both plural) without a finite verb in the clause. Because clause levels are not manually tagged in the NA27 with GRAMCORD Alpha morphology, we will do the best we can by filtering punctuation, at least preventing the terms from crossing major clause boundaries. There will be some 'false positives' (esp. where strings of participles are used substantively) but most of what this search will return are classic textbook examples of the Genitive Absolute---certainly the search is accurate and inclusive enough to be useful to someone studying the phenomenon.

  1. Start a new query by clicking File | New | Graphical Queries. Choose to name the Query or not, and then click OK. (If you haven't changed your keyboard back to English, you may want to do so now for naming the Query--press F2.)
  2. Click and drag the REF object onto the clean white Query document.
  3. Change the data type to Greek Morphology (GRAMCORD™) .
  4. Click the boxes Verb, Participle, and Genitive and then click OK.

A new object is pasted into your Query Document that tells you the Datatype and gives a morphology code describing what you are searching for. If you ever forget what the code means, you can always double-click on the object to pull up that morphology datatype editor to review or modify your choices.

So we have our first search term, the genitive participle, now let's add the second. The second term in a Genitive Absolute can be any number of different parts of speech, so we are going to use a reference list instead of a reference.

  1. Click and drag a new REF object onto your query.
  2. At the top of the TERM editor window, select Reference List instead of Reference.
  3. Click ADD and Reference from the button on the right.
  4. Check the boxes for Verb, Participle and Genitive and then click OK.
  5. Click ADD and Reference again to add another REF to our list.
  6. Click Noun and Genitive and OK.
  7. Click ADD and Reference again.
  8. Click Pronoun and Genitive and OK.
  9. Click ADD and Reference again.
  10. Click Adjective and Genitive and OK.
  11. Click OK again to exit the TERM editor.

Notice the Reference list added to the Query. The query will match any one of the items on that list--only one is required for a match.

Design Principle: It helps to only specify one part of speech (noun, verb, adjective, etc.) at a time in a reference list. It is possible to select more than one at a time, but then the Query Editor has to do some guesswork internally converting all the criteria you checked into a reference list. Often you'll get the results you expected, but sometimes you won't--it is better to be specific here.

Let's specify a relationship between our two search terms.

  1. Draw a line between the Reference and the Reference List. Terms in a genitive absolute may occur in any order, but we'll handle the reverse of this search at the end, for now, leave it be as a one-directional arrow.
  2. Genitive absolutes may be singular or plural, but they need to match, so drag an AGREEment object onto the Query.
  3. Draw a line from the AGREE to the REF and the REF list.
  4. Double click on AGREE to specify the type of agreement.

Note that there is a fair bit of flexibility over how you want terms to agree, but for now, we only care about number, so:

  1. Click the box marked Number in the General section and click OK.

Now we want to filter out finite verbs, other participles, and punctuation occurring between the two terms, so we'll use another reference list.

  1. Drag another REF onto the query.
  2. Choose Reference List at the top.
  3. Click ADD and Reference.
  4. Click Verb and Participle, Indicative, Subjunctive, Optative, and Imperative and then OK.

Note that Participle and Verb were split out into separate references on the list--this is by design.

  1. Click ADD and Reference.
  2. Click Punctuation and OK.
  3. Click on Intervening Term and Filter.

Excluding references that are part of reference lists is done one reference at a time, allowing more advanced filters that combine both negative and positive filters in a single reference list.

  1. With Punctuation highlighted in the Reference List, click Modify and Exclude References.

You'll notice a tilde character in front of Punctuation now, marking that it is an excluded item.

  1. Repeat step 28 with the other two items on this Reference List.

Note: you could also have highlighted all three references and modified them all at one by clicking and dragging over the whole list to select it, or using Shift+click or Ctrl+click in the standard Windows fashion.

  1. Click OK.

Our filter has been added to the query, now we need to connect it to the original two search terms. Remember from Lesson 1 that the direction of the arrows needs to match the direction of the arrows connecting the two search terms, so:

  1. Draw one arrow from the genitive participles REF to the filtered REF List.
  2. Draw another arrow from the filtered REF List to the unfiltered REF List.

Finally we need to allow for flexibility in word order--you'll likely remember this trick from Lesson 1.

  1. Click and drag on the Query window to highlight the entire query.
  2. Press Ctrl+C to copy.
  3. Press Contol+V to paste. Drag the pasted duplicate to a clean spot on your query document if needed.
  4. Now delete all three arrows in the new pasted duplicate, and then redraw them pointing in the opposite direction.

Our query is complete! Execute it by clicking the Search button at the top of the query window and navigating the search options the same way you did for Lesson 1. Just for fun, let's add one more level of complexity to the search, to give an idea of what the Query Editor is capable of.

One of the search results is Matthew 8:28. Here the participle is a form of the verb ερχομαι. Let's modify our genitive absolute search to find all occurrences where the participle is a form of ερχομαι.

  1. Click and drag a TERM object onto the query.
  2. Check the Language box and select Greek from the drop-down menu if it isn't there already.
  3. If you need to change to the Greek keyboard, press F2 twice.
  4. Type in ercomai (ερχομαι) and click OK.
  5. Draw an arrow from ερχομαι to the first Reference (the participle verb).
  6. Double-click the new arrow, select Same and press OK.

Notice that the arrow has turned into a long double line. Think of that as an 'equal' sign, albeit a long one. This means that the participle must be indexed to the same location as the Greek word ερχομαι. We need to repeat this process for the participle reference in the second half of the query (where the arrows are reversed).

  1. Click on the term ερχομαι to highlight it.
  2. Click Ctrl+C to copy.
  3. Click Ctrl+V to paste. Drag the new copy to a desirable location.
  4. Draw an arrow from the new copy of ερχομαι to the other verb, participle reference.
  5. Double-click the new arrow, select Same and press OK.

The new query is complete! This will find all the genitive absolutes where the participle (or one of the participles, if there are two) is from ερχομαι.

To complete this lesson, let's modify the query one more time. You've seen how Reference Lists are just collections of References where any one of the references will match the query. Word lists work the same way with words. Let's change our ερχομαι term to a word list, and add some related words, βαινω and καταβαινω, to the list of lexemes we want our query to match.

  1. Double click on one of the ερχομαι terms.
  2. The term is highlighted by default, press Ctrl+C to copy it to the clip board.
  3. Click on the Word List radio button at the top of the TERM editor window.
  4. Click Add and Word.
  5. Press Ctrl+V to paste ερχομαι back into the text box and then click OK.
  6. Click ADD and Word again.
  7. Type in bainw (βαινω) and click OK.
  8. Repeat steps 53 and 54 again, this time typing katabainw (καταβαινω).
  9. Click OK.

Now we just need to replace the other copy of the old term ερχομαι with our new word list.

  1. Click on the word list to select it and press Ctrl+C to copy.
  2. Press Ctrl+V to paste, and then move the new copy close to the word it is going to replace.
  3. Click and drag the end of the double line that is attached to ερχομαι over to the new wordlist.

You could also have just deleted ερχομαι and then drawn a completely new line, but I thought it was useful to show how you can move the ends of lines but clicking and dragging.

  1. Delete the old word ερχομαι.

Run this query by clicking the Search button at the top of the query editor window.

Congratulations again! You now know how to add morphological references, reference lists, word lists, agreement operators, filters on morph references and lists, and use the 'same' proximity operator to qualify a search term with additional criteria. You are well on your way to earning your Graphical Query Designer merit badge!

Lesson 3 - Advanced Concepts

Unlike the previous lessons based on one long query design session, our final lesson will consist of a series of short queries, designed to introduce individual features that haven't been covered previously.

Phrase Searching

  1. Start a new query.
  2. Drag a TERM onto the query document.
  3. Select the Language box and choose Greek.
  4. With your keyboard set to English (press F2 if you are still set to Greek) place two double quotation marks in the text box.
  5. Move your cursor between the quotes, change your keyboard to Greek (press F2 twice) and type de kai (δε και).
  6. Click OK.

Enclosing words in quotes is an easy way to specify a phrase, rather than connecting words with a bunch of arrows and 'adjacent' proximity operators. Laying down the quotes before you type the phrase is an especially useful trick when typing in Hebrew, where the switch to Right-to-Left can throw off your ability to place quotes afterwards.

This query will find all instances of the entire phrase de kai (δε και).

Regular Expressions

Regular Expressions are a collection of pattern matching operators. Libronix Digital Library Systems supports many of the regular expression operators. In general, because of how Libronix resources are currently indexed, Regular Expressions can only be used to match words, not phrases. In the query that follows, we will examine just a few different Regular Expressions. There are enough of them to deserve their own tutorial, but you'll get introduced to the basic syntax of using RegExp inside the Graphical Query Editor.

You'll have to switch back and forth between the English and the Greek keyboard often when working with these RegExp, so get used to that F2 key!

  1. Start a new query (or just delete the TERM from the previous query).
  2. Drag a TERM onto the Query document.
  3. Click the Language box and select Greek.

The pattern you want to match should be bounded by two forward slashes "//". These slashes tell the search engine that what is inside is a Regular Expression. In our first query, we are going to look for words that begin with συν, a prefix that generally means 'with' or 'together'. Regular Expressions in LDLS are bound to words. This is a little different that some other implementations of Rexular Expression syntax, which require you to use ^ or $ to match the beginning or end of a string, or \b to match a word boundary. For those familiar with other implementations of Regular Expressions, it is as if /./ were equivalent to /\b.\b/. If that seems confusing, don't worry about it - just remember that whatever pattern you are trying to match should match whole words. A period (.) in a Regular Expression stands for any character. An asterisk means that the previous element of the query can exist zero or more times. So (.*) would match an empty string or a string of any number of characters. In the example below, we use .* at the end of the pattern to make sure that we match to the end of the word. 

  1. Type in the following /συν.*/ ...typing the English keys sun to display the Greek letters and then click OK.

Go ahead and run this query. All words that begin with συν have been returned. However, depending on what letter follows, the nu (ν) in συν will often shift to a mu (μ) or a gamma (γ). In RexExp pattern matching, you can use square brackets to allow multiple characters to match in a given position. So let's alter our query to catch words that begin with συν, συμ, and συγ.

  1. Double-click on our RegExp.
  2. Edit the RexExp to match: /συ[νμγ].*/ ...typing su and nmg to get the Greek characters.
  3. Click OK.

Run this query and you'll notice the hit count is significantly increased, as we are trapping more words now.

A few more common RegExp features:

  • + designates that the preceding character (or character class, designated by brackets as in the above example) can occur 1 or more times in the pattern. So /lo+k/ will match on lok, look, or looook, but not lk.
  • * designates that the preceding character (or character class) can occur 0 or more times. So /lo*k/ will match on lok, look, or looook, AND lk.
  • ? designates that the preceding character (or character class) may occur 0 or 1 times. So /lo?k/ will match on lok and lk but not look or looook.
  • Parenthesis can be used 'algebraically' to group character together. For example, to write a query that matches 'Paul' or 'Paulus', you could write /Paulu?s?/, but that would also match Pauls and Paulu. /Paul(us)?/ is better, as it will only match what you are looking for.

Remember, if you plan on matching based on case (upper or lower) within your RegExp, you must also check the Match Case box in the TERM editor window.

There are some limitations to how Greek is handled within Regular Expressions (especially in relation to 'composed' Unicode characters), but they remain very useful tools.

Those are some of the most common Regular Expressions--hopefully you have at least some feel for how to use them in the 'TERM' object in your Graphical Query Editor now.

Field Searching

Sections of text are often encoded with 'field' tags describing the text. Some Bibles have things like the 'words of Christ' in field tags, allowing one to search just the words Christ spoke in direct address (or for that matter, alter the color of the display for that field to red or blue). You've already been using field tags without even knowing it--when you performed all these searches on 'Bible Text Only' you were searching for text tagged with Bible field tags. Every book supports it own set of field tags (some books may have none), so the first step in working with fields is to learn what fields you have to work with.

  1. If it is not open already, open the Nestle-Aland 27th Edition Greek New Testament with GRAMCORD Alpha Morphology.
  2. With the NA27 selected as the active window, click Help | About This Resource.

You should see about ten fields described. Let's use the field Old Testament Quote, used where the NT quotes the OT. Since that is a handful to type, take note of the aliases--we can just use the abbreviation OTQuote to work with this field.

Let's do a search to find all the places where the Greek word κυριος is used when quoting the Old Testament.

  1. Start a new Graphical Query.
  2. Drag a TERM into the Query Document.
  3. Click on the Language box and select Greek.
  4. With your keyboard set to Greek, enter kuriov (κυριος).
  5. Down in the Field box below, type in OTQuote and click OK.

Execute the search.

You can also exclude a field using by putting an exclamation mark '!' in front of the field name.  For example, if you wanted to search for the word λογος but NOT get a hit every time the lexical form tag λογος was in the text (to tag the words λογοι, λογους, etc.), you could put !Lemma in the field box, and then only actual inflected form of λογος would be returned by the search engine.

Document Levels

So far we have only been searching on verses, however sometimes a verse contains more than one sentence, and sometimes a sentence spans many verses. For complex syntactical searches, then, it is often useful to do a search on sentence boundaries instead of verse boundaries. Other document structures will be available in certain resources in the future (such as phrase boundaries). To view the document levels available in any given resource, follow the same steps as in the previous exercise.

  1. If it is not open already, open the Nestle-Aland 27th Edition Greek New Testament with GRAMCORD Alpha Morphology.
  2. With the NA27 selected as the active window, click Help | About This Resource.

Notice the document levels described.

  1. Now either go back to your previous Graphical Query, or start a new one and put a TERM, any TERM, into the document, or open an old Query using File | Open. Which query doesn't matter.
  2. Click Search.
  3. Make sure that the NA27 collection we created previously is selected as the search target.
  4. Where the Advanced Search dialog says By, choose Special and then select Sentence from the drop-down list.

You are now set to search by sentence instead of verse.

Reference Searching

For the final tutorial, we'll look at using the Graphical Query Editor to perform reference searches. If all you want to do is execute a simple reference search, it is probably faster to perform these searches using the Basic Search interface, but the creative graphical query designer can find ways to incorporate reference searching along with other search criteria, and examining reference searches explains a few more of the buttons in the Query Editor, so without further ado, let's take a look.

Instead of searching a Bible, we are going to perform these searches against some commentaries (or other books with a large number of Bible references, such as grammars, or certain lexical resources if you prefer).

  1. Either a) open a number of commentaries so we can simply execute our searches on all open resources or b) take the time to create another collection for the commentaries you want to search on a regular basis. I am going to use the Gospel of John for all my examples, so feel free to just use commentaries that cover that book if you like.
  2. Start a new Graphical Query.
  3. Drag a REF object onto your query document.
  4. In the Data Type dropdown, choose Bible.
  5. In the Term box, type John 1:18.
  6. At the bottom of the TERM editor window, select the radio button that says Equal and then click OK.
  7. Click Search and either search by your collection of commentaries, or by All Open Resources. Make sure that you aren't searching Bible Text Only since commentaries won't be tagged with the Bible text field--you won't get any hits searching for Bible text in books that aren't bibles!

Take a moment to examine the search results. The only hits that are returned on an 'equal' reference search are those that exactly match what you've keyed in.

  1. Double click on the REF object to get back into the TERM editor window.
  2. Click on the Intersect radio button and then click OK.
  3. Execute your search again.

All the hits from the previous search will be found, but now you also get hits where the reference is to a larger range that includes John 1:18, such as John 1:1-18.

  1. Double click on the REF object again.
  2. Change the Term from John 1:18 to John 1.
  3. Click on the Subset button and click OK.
  4. Execute your search again.

This search returns hits that are an exact match for John 1, but also matches individual verses found within John 1, such as John 1:18, or John 1:1, or ranges that fall within John 1, such as John 1:1-5. However, it will NOT return hits on ranges that are not completely contained within John 1. For example, you won't get a hit on a reference to John 1:1-12:5.

NOTE: The following is not completely implemented yet - there are some bugs in superset reference searches.

  1. Double click on our REF one more time.
  2. Change the reference to John 1:1-3
  3. Click on the Superset radio button and click OK.
  4. Execute your search again.

This should return those references which included John 1:1-3 in its entirety (such as a reference to John 1-3, or John 1:1-18).  Running a superset on a whole chapter doesn't always return the hits you would expect, and if you have old .LSF books that have not been updated to Libronix titles, they can give bad hits on these reference searches.

Remember that you can use these types of reference searches on more than just Bibles. One excellent use of reference searches is with homograph indicators (to help select between words that are spelled the same but have different meanings). Just connect the homograph reference to the lexical form with an arrow, and double-click on the arrow to set the proximity operator to 'same'. You can also perform reference searches on things like the Works of Josephus or the Works of Philo, or on the Dead Sea Scrolls Study Edition. Not every resource that has a reference scheme is organized hierarchically, however, so be aware that for some resources Equal will work like a charm, but the others (Subset, Superset, and Intersect) might not behave like you expect.

That's it! You now know how to use Regular Expressions, phrase searches, field searches, and Document levels in your queries, as well as how to use the graphical query editor to perform reference searches!