|This is a topic from the SwordSearcher Bible Software help file.|
Advanced Search Expressions
|Top Previous Next|
The Search Toolbar, Search Bible dialog (normal and proximity searches), Search KJV Words of Christ, and Full Library Search functions all support an advanced search expression syntax, described here.
Note that in most cases, the search options provided in the Search Bible and the Full Library Search dialogs will provide you with enough control over the search that it will not be necessary to use any advanced search expressions. You can safely skip this help topic if you only want to use SwordSearcher's standard search features.
A simple search can include one or more words, like this:
lord jesus christ
A Bible search for the above would find verses containing all three words, in any order or location in the verse. A library search would likewise find book and commentary entries with all three words, appearing in any order or location in the entry text. This is referred to as a Boolean AND search.
A phrase search is specified by using quotation marks, like this:
"lord jesus christ"
The above would find verses or entries that have the three words in the exact order.
Most searching in SwordSearcher disregards punctuation. A phrase search ignores punctuation in such a way that a search for "one two" would match text like "one, two." or "one two" or "one! two!" If you must perform a Bible search that includes punctuation, use Character String Search.
Boolean expressions allow you to combine comparison operations like OR, AND, NOT, and XOR, and use parentheses to group operations.
A simple example is to take our original search, lord jesus christ, and make it find verses with any of the words, rather than only verses with all of the words. We do this by adding the logical OR operator, which is a pipe (|) symbol (Shift+\ on your keyboard):
lord | jesus | christ
Unlike the first example, which would only find verses or entries with all three words, this search will find verses or entries that have any of the three words.
Now suppose we wanted to do something more complex, like find verses that have the phrase "lord jesus" or the word "christ". That search would look like this:
"lord jesus" | christ
Boolean expressions can also include parentheses to group operations. So, if you want to find any verse that has the three words lord, jesus, and christ, OR the exact phrase "lord god", you would specify your search like this:
(lord & jesus & christ) | "lord god"
The & symbol is the logical AND operator, and isn't actually required since AND is assumed. It's included here for clarity.
Here is a complete list of the Boolean operators SwordSearcher supports, in the order of precedence:
Again, a phrase is specified by placing text in quotes: "this is a phrase". If no Boolean operators are included in your search text, AND (&) is assumed.
Spelling out Boolean operators like AND or NOT is not supported because those words may frequently be part of the search itself. Therefore you must use the operator tokens listed above (!, &, |, ^).
The advanced search expression syntax supports several enhanced comparison modes that are applied on a per-word basis by using modifier tokens. A modifier token is placed just before or just after a word, or in some cases, inside a word.
For example, the wildcard token (*) placed after some letters tells SwordSearcher to search for any word starting with the letters. A search for
Finds god, godly, etc.
Here is a complete list of token modifiers and their functions, followed by more detailed examples:
Use the wildcard token to find any string of characters. Examples:
Wild character (?)
Use the wild character to stand in for any single character.
Finds love, lose, etc.
You can freely mix * and ? tokens in a word as needed.
Case sensitivity (_)
The Search Bible and Full Library Search dialogs allow you to do a case sensitive search, but the case sensitivity token makes it possible to mark a single word as case sensitive. For example:
_lord & god
Finds verses with both the words lord and god, but only matches the word lord when the letters are all lower case. The word god will still match god, God, and GOD, because it lacks the case sensitivity modifier token.
English stemming (=)
Place the stemming token after a word to find all word forms. For example:
jesus & love=
Finds verses that have the word jesus and also a form of the word love, such as love, loved, loveth, and lovest.
The English stemming comparison function only works on English texts. It works with older word forms like those in the KJV.
Fuzzy matching (~)
Use the fuzzy matching token to tell SwordSearcher to match words that mostly look the same. This is a "loose matching" function and can be useful when you are not sure of the spelling of a word. For example:
Finds verses with the word colour and colours.
While fuzzy matching is useful, it can frequently be too lenient. If you need help finding the spelling of a Bible word, you can also try using the Word List function of the Search Bible dialog, which implements a fuzzy matching list but allows you to search for just the words you want once you find them.
"jesus christ" saviour
"jesus christ" & saviour
performs stemming on love and would find verses like the following:
Proverbs 15:12 A scorner loveth not one that reproveth him: neither will he go unto the wise.
Proverbs 20:13 Love not sleep, lest thou come to poverty; open thine eyes, and thou shalt be satisfied with bread.
Revelation 12:11 And they overcame him by the blood of the Lamb, and by the word of their testimony; and they loved not their lives unto the death.
jesus | christ | saviour