Wildcards and Operators
Wildcards and operators are ways of making searches more powerful by expanding or restricting the search results that will be returned. Wildcards represent unknown characters in a search, and operators are used to combine search terms or specify a search range.
Wildcards can be used in any search type: search bar searches, search filter searches, or search syntax searches. Operators are generally used with search syntax searches.
Wildcards
Wildcards are used to represent one or more unknown characters in a search term. They are useful for searching for all documents containing variations of a word or when you are not sure of the exact characters contained in a word.
Note: Some search filters restrict the type of characters you can type in a field, preventing you from using a wildcard. For instance, a date search can only contain numbers. If you want to use a wildcard with these types of searches, you can use search syntax.
Wildcard | Description |
---|---|
* | (Asterisk) Represents zero or more missing characters. For example, govern*s would find "governors," "governments," and "governs." |
? | (Question mark) Represents any single character. For example, gr?y would find "gray" and "grey," but not "gravy." |
[] | (Brackets) Brackets are also used as a wildcard for any single character. A limited set of replacement characters can be specified within the brackets. For example, gr[ae]y would find "gray" and "grey," but no others. |
- | (Dash) Indicates a range of characters. For example, b[a-i]tter would find the words "batter," "better" and "bitter," but not "butter." |
[0-9] | Represents any single digit number. For example, [0-9][0-9] would find any two-digit number (but not a one- or three-digit number), and [0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9][0-9][0-9] would find a social security number. |
Tip: Wildcards may be combined. For example, br[a-o]ke* would find all of the following words: brake, braked, broke, broker, and broken.
Operators
Operators allow you to combine searches, or to restrict searches in certain ways. Each type of operator has a different purpose. Operators are generally used with search syntax searches.
Note: Certain operators can only be used when performing specific types of searches. Limitations on the uses of a particular operator are included as a part of the description.
Search Relationship Operators
Search syntax allows you to specify multiple search criteria; operators specify the relationship between each search criteria. Search results will then be limited according to the specified relationship. A list of the operators that can separate one search criteria from another is listed below.
Operator | Description | Sample |
---|---|---|
& | (AND) Valid search results match the search criteria that appear before and after the ampersand. | Criteria1 & Criteria2 |
| | (OR) Valid search results match either or all search criteria that appear before or after the pipe (vertical bar). | Criteria1 | Criteria2 |
- | (NOT) Valid search results match the search criteria that appear before the dash, but must not satisfy the search criteria that appear after the dash. | Criteria1 - Criteria2 |
^# | (WITHIN) Use the caret symbol to determine the maximum distance by which two phrases can be separated in a document and still be considered a valid search result. This operator can only be used between two phrases in a text search. | Phrase1 ^5 Phrase2 |
-^# | (NOT WITHIN) Use the minus sign plus the caret symbol when you want to return documents in which two phrases exist but are not within a specified distance of one another. This operator can only be used between two phrases in a text search. | Phrase1 -^5 Phrase2 |
, | (Comma) Use a comma instead of the AND operator to perform a search on multiple fields. The advantage of using a comma instead of an ampersand is that it will return search results more quickly.
A comma can only be used when performing field searches. The sample syntax shown to the right indicates the proper usage of a comma. Note: You can combine additional fields by simply adding a comma, a space, and the field syntax after the last quotation mark. An additional field search was added to the bottom sample syntax. |
{[TemplateName]:[FieldName1]="Value1", [FieldName2]="Value2"}
{[TemplateName]:[FieldName1]="Value1", [FieldName2]="Value2", [FieldName3]="Value3"} |
Parentheses
Parentheses can be used to group search criteria together. They are used to determine the order in which search criteria will be processed; they can be nested as deeply as you like. Laserfiche processes the innermost parentheses first and works outward. If there are no parentheses, NOT (-) searches will be evaluated first, then AND (&) searches, and finally | (OR) searches. If adjacent operators are the same (for instance "A & B & C"), they will be evaluated left to right.
Note:( is a delimiter. You cannot search for a word or phrase that includes this character unless you put the word or phrase inside quotation marks.
Search Syntax Operators
Different types of search syntaxes, except for text searches, use operators as a part of their syntax.
Operator | Description | Sample |
---|---|---|
{} | Used by all search syntaxes except for text search. Should enclose each search criteria, except text searches. | {LF:Name="Query", Type=FBD} |
= or ~= | Indicates that valid search results must match the specified value. Some search types use the = operator, while others use the ~= operator; see the search syntax help for information on which operator to use. | {[General]:[Author]="John Smith"} |
> | Indicates valid search results must be greater than the specified value. Can only be used when searching for date or numeric information | {[General]:[Date]>"5/27/2005"} |
>= | Indicates valid search results must be greater than or equal to the specified value. Can only be used when searching for date or numeric information. | {[General]:[Date]>="5/27/2005"} |
< | Indicates valid search results must be less than the specified value. Can only be used when searching for date or numeric information. | {[General]:[Date]<"5/27/2005"} |
<= | Indicates valid search results must be less than or equal to the specified value. Can only be used when searching for date or numeric information. | {[General]:[Date]<="5/27/2005"} |
<> |
Indicates valid search results must not be equal to the specified value. Note: The operator does not match blank values. To include blank values as part of the results, use the | operator to include a search that will match for "". |
{[General]:[Date]<>"5/27/2005"}
{[General]:[Date]<>"5/27/2005"} | {[General]:[Date]=""} |
'' | Used to indicate an exact phrase search for several search syntax searches; see the search syntax help for information on which search types require single quotes for exact phrase search. (Text search indicates a phrase search using double quotes.) Search types that do not require single quotes for exact phrase searches are always performed as exact phrase searches. The single quotes are enclosed within the double quotes that are standard to the search syntax. | {[General]:[Status]~="'needs review'"} |