Boolean Operators are special words that you can include in your search query so as to customize the results to your needs. The main boolean operators are OR, AND, and NOT. Below are details according to each one.
The OR Operator
This is the default operator for this search form and is used to return the broadest range of search results. This is also the most common form of search query, as shown in the following example:
Jesus faith love = Jesus OR faith OR love
In this search query, the search results would include documents that contain either "Jesus," "faith," or "love" but the words do not necessarily need to occur together in the same document. Because of this, a document returned from the above query may include "Jesus" but not "faith" or "love"or vice versa.
The AND Operator
This boolean operator is used to connect words together. If you use the AND operator, the words connected by the operator must be included together in the same document for it to be returned. Consider the following example:
Jesus AND faith AND love
In this search query, the words "Jesus," "faith," and "love" would all need to be included in the document for the search result to be returned. In this case, Jesus AND faith AND love would yield different results than Jesus AND faith love. Remember, the default operator is the OR operator; therefore, the latter search results would include "Jesus" and "faith" but not necessarily "love."
The NOT Operator
The NOT boolean operator is used to definiteively exclude documents that contain certain words from returning within the result set. Consider the following example:
Jesus AND faith NOT love
If the above query is used, documents containing both "Jesus" and "love" would return; but, documents with the word "love" would be excludeddespite the fact that they may include both "Jesus" and "faith."
Phrase searches are powerful but they must be used in a specific way to return accurate results. Below are some tips that will display the exact syntax that needs to be used.
When combining multiple phrases, or combining keywords and phrases, a boolean operator must be used. The following search queries would not work because there is no boolean operator present.
"Jesus is Lord" "works of God"
"Jesus is Lord" God
If a boolean operator is not used, the search will simply yield zero (0) results. The following examples would return the desired results.
"Jesus is Lord" AND "works of God"
"Jesus is Lord" OR God
"Jesus is Lord" AND "the messiah" NOT Pilate