Operators
Each type of operator has a different purpose. Some are useful for specifying search criteria relationships, while others are essential elements for most search syntax types. If you will be using advanced search syntax, it is important for you to become familiar with the different types of operators. Learn about search types.
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.
To find out more about a particular operator, refer to:
Advanced search syntax allows you to specify multiple search criteria; however, you must specify the relationship between each search criteria using operators. 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 carat 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 an indexed search. | Phrase1 ^5 Phrase2 |
-^# | (NOT WITHIN) Use the minus sign plus the carat 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 an indexed 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.
Unlike the above operators, 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"} |
Note: Laserfiche will interpret the sample syntax provided in the table below as follows: valid search results must either satisfy criteria A and B or they must satisfy criteria C and D.
Operator | Description | Sample |
---|---|---|
() | 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. | (a & b) | (c & d) |
Note: ( is a delimiter. You cannot search for a word or phrase that includes this delimiter unless you put the word or phrase inside double quotation marks.
Different types of advanced 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} |
= | Indicates that valid search results must match the specified value. If a search type may be either indexed or non-indexed, this operator will perform the search as a non-indexed search. (Text searches do not need an operator, and are always indexed searches.) | {[General]:[Author]="John Smith"} |
~= | Indicates that valid search results must match the specified value (with allowances for fuzzy search and root word search, if they are enabled). If a search type may be either indexed or non-indexed, this operator will perform the search as an indexed search. It is not supported with document text searches (which are always indexed and do not need an operator) or with non-indexed search types. | {[General:[Document]~="John"} |
> | 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. | {[General]:[Date]<>"5/27/2005"} |
'' | Used to indicate an exact phrase search for all indexed advanced search types except text search. (Text search indicates a phrase search using double quotes. Indexed searches performed in the Search Pane rather than as advanced searches are use double quotes.) Non-indexed search types are always performed as exact phrase searches. The single quotes are enclosed within the double quotes that are standard to the advanced search syntax. | {[General]:[Status]~="'needs review'"} |