Query Syntax
This page gives an overview of the available query syntax.
Searching is case-insensitive
The Truth Search Tool does not distinguish between lowercase and uppercase characters, so it doesn't matter if the words you enter are completely lowercase, or completely uppercase, or a mix of both. The only exceptions are the keywords OR
, AND
, NOT
and TO
, which must always be entered in uppercase. (For the TO
keyword, see the 'range searches' section below.)
Proximity Searches
Proximity searches allow you to find words that are within a specific distance away from each other. To do a proximity search, put a tilde ('~'
) at the end of a phrase, followed by a distance value. — Note that this is syntactically similar to fuzzy searches. For example, to search for documents containing faith
and justification
within 10 words of each other, type in: "faith justification"~10
Phrase Searches and Required Terms
To search for a phrase (i.e. a sequence of words), put the phrase in double quotes. To indicate that the documents to search for must contain a particular word, put a '+'
in front of the word. Of course you can combine these constructs with boolean operators and parentheses. Again, some examples:
Query | Resulting documents contain... |
---|---|
"times of restitution" |
the words times , of and restitution , in that particular order |
+household faith |
definitely household , and maybe also faith |
"new creature" AND christ |
the phrase new creature , and the word christ |
+parousia +epiphania |
(equivalent to the query parousia AND epiphania ) |
Wildcards
Question marks ('?'
) and asterisks ('*'
) can be used to indicate that some characters are unknown. The question mark stands for exactly one unknown character, while the asterisk stands for zero or more unknown characters. Examples:
Query | Resulting documents contain... |
---|---|
luc? |
lucy , luca , ... |
luc* |
luc , lucy , luck , lucene , ... |
*ene* |
lucene , energy , generator , ... |
Note: If wildcards are used as the first character of a word, the search tends to be slower on average. This is due to how the index is structured: It's as if you tried to look up someone's phone number, and you only know that person's first name. So, in the example above, searching for *ene*
will probably be slower than the other searches because *ene*
starts with a wildcard.
Boolean Operators
The Truth Search Tool supports the boolean operators OR
, AND
and NOT
. If words are concatenated without boolean operators, The Truth Search Tool will by default treat them as if they were concatenated with OR
. If you don't like that, you can go to the preferences and set AND
as the default.
Instead of OR
, AND
and NOT
, you can also use ||
, &&
and '-'
(minus symbol), respectively. You can use parentheses to group certain expressions. Here are some examples:
Query | Resulting documents contain... |
---|---|
dog OR cat |
either dog , or cat , or both |
dog AND cat |
both dog and cat |
dog cat |
(by default equivalent to the query dog OR cat ) |
dog NOT cat |
dog , but not cat |
-dog cat |
cat , but not dog |
(dog OR cat) AND mouse |
mouse , and either dog or cat , or both |
Fuzzy Searches
Fuzzy searches allow you to search for words similar to a given word. For example, if you search for roam~
, the Truth Search Tool will find documents containing words like foam
and roams
.
Additionally, you can append a similarity threshold between 0 and 1, like so: roam~0.8
. The higher the threshold, the higher the similarity of the returned matches. Leaving out the threshold is the same as using the default value of 0.5.
Range Searches
The Truth Search Tool allows searching for words that are lexicographically between two other words. For example, the word beta
lies between alpha
and gamma
. So, if you want to list all documents that contain words between alpha
and gamma
, type in: [alpha TO gamma]
.
When using the square brackets, the range query is inclusive, i.e. alpha
and gamma
are included in the results. To do an exclusive range search, use curly brackets instead: {alpha TO gamma}