@@ -33,15 +33,18 @@ To search for a key or value with multiple words, you must quote the key/value w
33
33
"multi-word key": "multi-word value"
34
34
```
35
35
36
- Queries for keys or values with the following literal characters must escape the characters using a
37
- ` \ ` (backslash): ` \ ` , ` ( ` , ` ) ` , ` : ` , ` < ` , ` > ` , ` " ` , ` * ` , ` { ` , ` } ` .
38
-
39
36
:::{caution}
40
37
Currently, a query that contains spaces is interpreted as a substring search, i.e., it will match
41
38
log events that contain the value as a * substring* . In a future version of CLP, these queries will
42
39
be interpreted as _ exact_ searches unless they include [ wildcards] ( #wildcards-in-values ) .
43
40
:::
44
41
42
+ :::{note}
43
+ Certain characters have special meanings when used in keys or values, so to search for the
44
+ characters literally, you must escape them. For a list of such characters, see
45
+ [ Escaping special characters] ( #escaping-special-characters ) .
46
+ :::
47
+
45
48
### Querying nested kv-pairs
46
49
47
50
If the kv-pair is nested in one or more objects, you can specify the key in one of two ways:
@@ -161,6 +164,33 @@ There are three supported boolean operators:
161
164
162
165
You can use parentheses (` () ` ) to apply an operator to a group of expressions.
163
166
167
+ ### Escaping special characters
168
+
169
+ Keys containing the following literal characters must escape the characters using a ` \ ` (backslash):
170
+
171
+ * ` \ `
172
+ * ` " `
173
+ * ` . `
174
+
175
+ Values containing the following literal characters must escape the characters using a ` \ `
176
+ (backslash):
177
+
178
+ * ` \ `
179
+ * ` " `
180
+ * ` ? `
181
+ * ` * `
182
+
183
+ _ Unquoted_ keys or values containing the following literal characters must also escape the
184
+ characters using a ` \ ` (backslash):
185
+
186
+ * ` ( `
187
+ * ` ) `
188
+ * ` : `
189
+ * ` < `
190
+ * ` > `
191
+ * ` { `
192
+ * ` } `
193
+
164
194
## Examples
165
195
166
196
** Search for log events that contain a specific key-value pair:**
0 commit comments