From ee700568ed4028b6846377378faeafd66e2eae6b Mon Sep 17 00:00:00 2001 From: gibber9809 Date: Mon, 2 Dec 2024 11:25:19 -0500 Subject: [PATCH] Update docs for escaping characters in clp-s search --- docs/src/user-guide/reference-json-search-syntax.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/src/user-guide/reference-json-search-syntax.md b/docs/src/user-guide/reference-json-search-syntax.md index ca6898984..c4ac6c09e 100644 --- a/docs/src/user-guide/reference-json-search-syntax.md +++ b/docs/src/user-guide/reference-json-search-syntax.md @@ -33,8 +33,17 @@ To search for a key or value with multiple words, you must quote the key/value w "multi-word key": "multi-word value" ``` -Queries for keys or values with the following literal characters must escape the characters using a -`\` (backslash): `\`, `(`, `)`, `:`, `<`, `>`, `"`, `*`, `{`, `}`. +Keys or values with the following literal characters must escape the characters using a `\` + (backslash): `\`, `"`. + +Unquoted keys or values must also escape the following characters: `(`, `)`, `:`, `<`, `>`, `{`, + `}`. The unquoted keywords `and`, `or`, and `not` can also be escaped with a `\`. + +Values containing `?` and `*` can escape these characters with a `\` to differentiate them from the + `?` and `*` characters used to specify arbitrary single character match and wildcard match. + +Keys containing `.` can escape the `.` with `\` to differentiate from the special `.` character that +indicates nested keys. :::{caution} Currently, a query that contains spaces is interpreted as a substring search, i.e., it will match