Syntax | Semantics |
key:value | The "key-value" search format. You need to enable the key-value index. The value supports fuzzy search by ? or * |
A and B | The "AND" logic that returns the intersection of A and B. If several keywords are separated by spaces, the "AND" logic is used by default |
A or B | The "OR" logic that returns the union of A or B |
not B | The "NOT" logic that returns the results excluding B |
A not B | The "MINUS" logic that returns the results including A but excluding B, i.e., A - B |
'a' | The character a will be considered as a regular character and will not be processed as a syntax keyword |
"A" | All characters in A will be considered as regular characters and will not be processed as syntax keywords |
\\ | Escape character. An escaped character represents the literal meaning of the character, such as \\" for quotation mark or \\: for colon |
* | Fuzzy query of keywords that can match zero, single, or multiple random characters. But the search cannot start with * . For example, enter abc* to search for all logs beginning with abc |
? | Fuzzy query of keywords that can match a single character at a specific position. For example, enter ab?c to search for logs that begin with ab , end with c , and contain only one character between ab and c |
> | "GREATER THAN" logic, which is used for numeric fields |
>= | "GREATER THAN OR EQUAL TO" logic, which is used for numeric fields |
< | "LESS THAN" logic, which is used for numeric fields |
<= | "LESS THAN OR EQUAL TO" logic, which is used for numeric fields |
= | "EQUAL TO" logic, which can be used for numeric or text fields (Fuzzy search is not supported. If you need fuzzy search, please see the key-value search key:value ) |
__SOURCE__ | The operator that specifies the IP address of a source whose logs you want to query, and wildcard is supported, such as __SOURCE__:127.0.0.* |
__FILENAME__ | The operator that specifies the file path from which you want to query logs, and wildcard is supported, such as __FILENAME__:/var/log/access.* |
a=b
and a:b
lies in that a equals b in the former, while a contains b in the latter (the search is processed based on the segment logic and fuzzy search is supported).error
in the search box to search for log data containing the keyword error
.status:error
in the search box to search for log data whose status
field is error
.Metacharacter | Description |
* | Fuzzy query of keywords that can match zero, single, or multiple random characters. For example, enter abc* to search for all logs beginning with abc |
? | Fuzzy query of keywords that can match a single character at a specific position. For example, enter ab?c to search for logs that begin with ab , end with c , and contain only one character between ab and c |
Was this page helpful?