In addition to simply entering text strings, it is possible to add action commands directly into the search string text to narrow down your search.
Phrase Search
The purpose of a Phrase Search is to define that you are looking for a specific text string, which can be complete sentences, several sentences or parts of a sentence.
The phrase search is executed by putting "quotation marks" around the search string.
Example: "This is a search string" will only return files that contain the phrase between the quotation marks. It is important to note that when using quotes, the string is not an absolute query, as stemmed words will also be included. In this example, different forms of the words "search" (e.g. searched, searching) and "string" (e.g. strings, stringing) will also be returned in the search results. For example, documents containing the phrase "This is a searched string" will also be included in the search results.
Boolean Search
OR
If you want to search for documents that contain either of two words or phrases, use the OR operator. Keep in mind that if you don't put a Boolean operator between two search words, the OR operator will be added between them automatically.
The OR operator is the default conjunction operator. This means that if there isn't a Boolean operator between two terms, the OR operator is used. The OR operator links two terms and finds a matching document if either of the terms exist in a document. This is equivalent to a union using sets. The symbol || can be used in place of the word OR.
To search for documents that contain either "apple pie" or "custard" use the query:
"apple pie" custardor
"apple pie" OR custard
AND
If you want to search for documents that contain more than one word or phrase, use the AND operator.
The AND operator matches documents where both terms exist anywhere in the text of a single document. This is equivalent to an intersection using sets. The symbol && can be used in place of the word AND.
To search for documents that contain "favorite dessert" and "apple pie" use the query:
"favorite dessert" AND "apple pie"
NOT
When performing a search, documents that contain the search word or phrase immediately after the NOT operator will be excluded from the search results.
For example, to search for documents that contain "favorite dessert" but not "blueberry pie", use the query:
"favorite dessert" NOT "blueberry pie"
The NOT operator excludes documents that contain the term after NOT. This is equivalent to a difference using sets. The symbol ! can be used in place of the word NOT.
Plus (+) and Minus (-)
Within a search phrase, you can use the plus (+) and minus (-) characters to indicate terms that must be included or must be excluded from the search results.
To ensure specific words are included in or excluded from the hit list, simply add the following in front of your search text string:
+ (Plus) in front of each and every word you want to include, or
- (Minus) in front of each and every word you want to exclude
Example: The search ”grandma best +recipes +apple -blueberry pie” will ensure that the results list will only include documents that contain “recipes” and “apple.” No document in the results list will contain “blueberry.” The results list may or may not include documents that contain "grandma" and/or "best".
Grouping
You can use parentheses to group clauses to form sub queries. This can be very useful if you want to control the boolean logic for a query.
To search for either "apple" or "blueberry" and "pie" use the query:
(apple OR blueberry) AND pie
Fuzzy Search
To perform a fuzzy search, use the tilde "~" symbol at the end of a single word term. For example, to search for a term similar in spelling to "roam" use the fuzzy search:
roam~
This search will find terms like "foam" and "roams". An additional (optional) parameter can specify the required similarity. The value is between 0 and 1, with a value closer to 1 only terms with a higher similarity will be matched. For example:
roam~0.8
The default value of 0.5 is used if the parameter is not given.
Proximity Search
ViaWorks
ayfie Locator supports searching for words that are within a specific distance from one another. To perform a proximity search, use the tilde, "~", symbol at the end of a phrase, followed by a number. This value represents the number of words that separate the two search terms within the document.
For example, to search for "blueberry" and "pie" within a distance of 10 words of each other in a document, use the following search string:
Example: "blueberry pie"~10
Wildcard Search
If you are uncertain about the proper spelling or letters in a search word, then Wildcards may prove useful.
* The asterisk wildcard substitutes all letters that follow (after the asterisk) in a word.
Example: Info* will search all words that begin with info, such as information, informant, etc.? The Question Mark Wildcard substitutes one letter in the search word.
Example: J?nsen will search Jensen, Jansen, Jonsen, etc.
Boosting
For any search, there is a relevance level of matched documents based on the terms found. This determines the order of documents presented in the search results list. You can change the default relevance, and thus the order of the search results by boosting words or phrases.
To boost a term, use the caret "^" symbol with a boost factor (a number) at the end of the term. The higher the boost factor, the more relevant the term will be.
blueberry pie
...and you want the term "blueberry" to be more relevant, boost it using the ^ symbol along with the boost factor. You would type:
This will make documents with the term blueberry appear more relevant. You can also boost phrases as in the example:
blueberry^4 pie
By default, the boost factor is 1. Although the boost factor must be positive, it can be less than 1 (e.g. 0.2)
"blueberry pie"^4 "favorite desserts"
...