clp
clp copied to clipboard
Escaped and wildcard "?" not properly handled during search
Bug
Currently CLG replaces ? with * in the search query because we don't handle ? wildcard and fallback to decompression and match. However, this doesn't consider the case when a ? is escaped.
Note: the query discussed below are queries seen by CLP. if you enter the query on the commandline via bash, you may need to add extra escapes for bash to properly interpret the query.
For example, considering the query INFO \? TEXT
, which shall match a plain text ? in the log. current CLG will replace the ? with * and end up searching for the wrong results.
While I tried a quick fix (not submitted) for the issue above, there were other bugs that I noticed.
For example, considering the query INFO \\? TEXT
. The query shall match a plain text \ in the log, then ? will server as wildcard and match any character. However the CLG is not returning the correct results.
CLP version
5d6ff54d375af35f8aadd7d551672c255f627ab9
Environment
22.04 Ubuntu
Reproduction steps
Attaching log and queries that can be used for testing and reproducing the issue.
Currently running the query in the CLP won't generate the correctly matched results.
Note: the queries attached are what should be seen by CLP. if you enter the query on the commandline via bash, you may need to add extra escapes for bash to properly interpret the query.