Skip to content

Commit

Permalink
Update docs for escaping characters in clp-s search
Browse files Browse the repository at this point in the history
  • Loading branch information
gibber9809 committed Dec 2, 2024
1 parent 5881b9c commit ee70056
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions docs/src/user-guide/reference-json-search-syntax.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ee70056

Please sign in to comment.